Click or drag to resize

BaseMetafileCommandCreateArc Method

Tries to approximate the command by a circular arc.

Namespace: RAYLASE.Marker.VectorGraphicElement.MetafileCommand
Assembly: RAYLASE.Marker.VectorGraphicElement (in RAYLASE.Marker.VectorGraphicElement.dll) Version: 2.19.0
Syntax
C#
public virtual ArcToMetafileCommand CreateArc(
	int startIdx = -1,
	int numberOfPoints = 0,
	double delta = 100
)

Parameters

startIdx  Int32  (Optional)
The start index in the list of points of the (possibly newly created) polyline from which on the circle should be retrieved. The start point of a command is always SegmentEndPointPair.Start, and the point list of a polyline starts with the second point! To use the first point startIdx must be set to -1 therefore.
numberOfPoints  Int32  (Optional)
The number of points of the (possibly newly created) polyline from which on the arc should be retrieved. It must be at least 3. If 0, all points of the polyline will be considered.
delta  Double  (Optional)
A point P is considered to be laying on a line if the perpendicular of P to the line between the line and P is less than this value in micrometers.

Return Value

ArcToMetafileCommand
The calculated arc, averaging if more than three points are to be considered.
Remarks
It is working exactly only for a polyline consisting out of three points. For larger polylines an arc is calculated for each three points, and the average arc is returned; its start and endpoint are the same as of the original command. Other commands are converted into a polyline first before the average circle is calculated, and the "straight points" in the polyline are removed using the delta in a second step.
See Also