GdiExtensionMethodsShortenedBy(PointF, Int32, Int32, RADouble, RADouble) Method |
Returns a new, shortened polyline. If the shortened line would have zero or negative length, null is returned.
Namespace: Altaxo.Graph.GdiAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static PointF[]? ShortenedBy(
this PointF[] polyline,
int startIdx,
int count,
RADouble marginAtStart,
RADouble marginAtEnd
)
Parameters
- polyline PointF
- The points of the polyline. Only points starting from startIdx with the number of points = count are considered to be part of the polyline.
- startIdx Int32
- Index of the first point of the polyline in array polyline.
- count Int32
- The number of points of the polyline. An exception is thrown if this argument is less than 2.
- marginAtStart RADouble
- The margin at start. Either an absolute value, or relative to the total length of the polyline.
- marginAtEnd RADouble
- The margin at end. Either an absolute value, or relative to the total length of the polyline.
Return Value
PointFA new, shortened polyline. If the shortened line would have zero or negative length,
null is returned.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
PointF. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also