Click or drag to resize

PolylinePrimitiveSetSubset Method

Defines the positions of a polyline using a subset of input positions.

Namespace:  AGI.Foundation.Graphics
Assembly:  AGI.Foundation.Graphics (in AGI.Foundation.Graphics.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public void SetSubset(
	Cartesian[] positions,
	int index,
	int count
)

Parameters

positions
Type: AGI.Foundation.CoordinatesCartesian
An array of positions. The subset of this array defined by index and count define the new positions for the polyline.
index
Type: SystemInt32
A zero-based index into positions that defines the first position copied to the polyline.
count
Type: SystemInt32
The number of elements in positions copied to the polyline.
Exceptions
ExceptionCondition
ArgumentNullExceptionpositions is null.
ArgumentException When the polyline's PolylineType is Lines, the subset of positions must have an even number of elements. Every two positions define a line segment.
ArgumentOutOfRangeExceptionindex cannot be less than 0 and count cannot be less than 1. index+count can include elements outside of the array's bounds.
CouldNotCreateVideoCardResourceException Could not allocate video memory for the subset of positions.
Remarks
When the caller has an array of positions and wants to define a polyline primitive using a continuous subset of the array, calling SetSubset is more convenient and efficient than copying the positions into a temporary array and calling Set
See Also