IMcGraphObjLineGetPoints Method
|
|
Returns one or several points defining a graphic object.
Namespace:
MediaCy.IQL.Display.Overlays
Assembly:
MediaCy.IQL.Display.Overlays (in MediaCy.IQL.Display.Overlays.dll) Version: 10.0.6912.0
SyntaxFunction GetPoints (
PointIndex As Integer,
<OptionalAttribute> <OutAttribute> ByRef Points As Object
) As Integer
Parameters
- PointIndex
- Type: SystemInt32
The index of the point. If this is mcgwpAllPoints,
then the coordinates of all points are returned.
Otherwise this must be a point index value between 0 and the point-count minus 1. - Points (Optional)
- Type: SystemObject
If NULL or pointing to a VT_ERROR or VT_NULL variant (parameter
omitted), then only the count is returned. if a VT_EMPTY variant, on return
it will be shaped and filled with an array containing 2 float values per
point, X followed by Y.
Otherwise Points must reference a Variant containing an array or
record(s) of the proper type and size. Allowed types are LONGPOINT or long,
SINGLEPOINT or Single, and DOUBLEPOINT or double. A non-Emtpy Variant of
the right size and type will be filled with x,y pixel coordinate values (one
record per point or two long/float/double values per point)
Return Value
Type:
Int32The point-count; i.e., number of X,Y pairs needed in Points to fully
fill it. If Point references an array of long/float/double, then the return
value will be equal to half the size of that array since there are two
values per point.
Implements
IMcGraphObjRectGetPoints(Int32, Object)
RemarksThe number of points and their layout is determined by the object class,
see the description of the interfaces derived from McGraphObj for details.
The points returned by this method are rotated about the object's center-point
by the AngleOfRotation property. This is different from the GetHandle
and GetPosition methods, which take and return points that are un-rotated (that is,
at an AngleOfRotation equal to zero). The RotatedHandle and RotatedPosition
properties expose and allow assignment of rotated coordinates. Also, the
GetBounds method returns the bounds of the rotated points.
ExamplesDim obj As McGraphObj
Dim floatArray As Variant
Dim pointCount As Long
Dim pointArray() As SINGLEPOINT
...
pointCount = obj.GetPoints(mcgwpAllPoints)
obj.GetPoints mcgwpAllPoints, floatArray
Redim pointArray(0 to pointCount-1)
obj.GetPoints mcgwpAllPoints, pointArray
See Also