Click or drag to resize

PolyLineMetafileCommandCreateArc Method

Tries to approximate the polyline by an arc.

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

Parameters

startIdx  Int32  (Optional)
The start index in the list of points.
numberOfPoints  Int32  (Optional)
The number of points to be considered. It must be at least 3.
delta  Double  (Optional)
Not used in this method.

Return Value

ArcToMetafileCommand
The calculated arc, averaging if more than three points are to be considered. If startIdx is -1, all points in the polyline including the segment start point will 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 polyline. In case of 3D coordinates (z values are there) the end point may differ slightly from the original. To avoid building up these errors when replacing all polylines in a path each polyline should be converted by its own and in a second step all polylines should be replaced one by one by the corresponding arc.
See Also