FitCurve method

Microsoft Visio Developer Reference

FitCurve method

   Example   

Reduces the number of geometry segments in a shape or shapes by replacing them with similar spline, arc, and line segments that approximate the paths of the initial segments. Typically, this reduces the number of segments in the shape.

Version added

4.1

Syntax

object.FitCurve tolerance, flags

object

Required. An expression that returns a Shape or Selection object whose path is to be replaced.

tolerance

Required Double. How closely the resulting paths must match the shape's original paths.

flags

Required Integer. Flags that influence how the shape is drawn.

Remarks

The FitCurve method of a Selection object optimizes each of the shapes in the selection. It does not combine the selected shapes into a single shape.

The paths resulting from the FitCurve method fall within the given tolerance of the initial paths. Tolerance should be in internal drawing units (inches). To match the initial paths exactly, specify a tolerance of zero (0).

The flags argument is a bit mask that specifies options for optimizing the paths. Its value should be a combination of zero or more of the following values.

Constant

Value

Description

visSplinePeriodic

&H1

Produce periodic splines if appropriate.

visSplineDoCircles

&H2

Recognize circular segments in the shape(s) and generate circular arcs instead of spline rows for those segments.

visSplineAbrupt

&H4

Break the resulting splines whenever an abrupt change of direction or curvature in a path is detected.