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: 25.2.423.0 (25.2.423.0)
Syntaxpublic void SetSubset(
Cartesian[] positions,
int index,
int count
)
Public Sub SetSubset (
positions As Cartesian(),
index As Integer,
count As Integer
)
public:
void SetSubset(
array<Cartesian>^ positions,
int index,
int count
)
member SetSubset :
positions : Cartesian[] *
index : int *
count : int -> unit
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| Exception | Condition |
|---|
| ArgumentNullException | positions 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.
|
| ArgumentOutOfRangeException | index 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