IMcRegionsGetLineSegments Method
|
|
For a given y-position, get the list of horizontal line segments
that lie within the features bounds.
Namespace:
MediaCy.IQL.Features
Assembly:
MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
SyntaxFunction GetLineSegments (
<OptionalAttribute> <OutAttribute> ByRef pvSegments As Object,
Optional y As Integer = 0,
Optional xMin As Integer = 0,
Optional xMax As Integer = -1
) As Integer
Parameters
- pvSegments (Optional)
- Type: SystemObject
If given, an empty variant (VT_EMPTY) or a variant
containing a safearray of long or LONGRANGE structs. The method will change the empty variant into
a variant containing a safearray of long (two long per segment); this array
will be large enough to hold the maximum number of segments in any line for
the current feature. A non-emtpy variant of an adequate size and of type
long will be filled with pairs of end-points (one pair of end-points per
segment). If not given, all other arguments are ignored and the maximum
number of segments in any line is returned. - y (Optional)
- Type: SystemInt32
A given line position. If the line lies outside the region, the
method returns 0 segments. - xMin (Optional)
- Type: SystemInt32
The low end of a clipping interval. No segment end-point returned
will be smaller than xMin. Optional parameter. - xMax (Optional)
- Type: SystemInt32
The high end of a clipping interval. No segment end-point returned
will be greater than xMax. Optional parameter.
Return Value
Type:
Int32Number of segments returned. This number is half the
number of elements returned in pvSegments since each segment is expressed
by a pair of values. If the pvSegments argument is missing, then
the maximum number of segments in any line is returned.
Implements
IMcFeaturesGetLineSegments(Object, Int32, Int32, Int32)
RemarksA more efficient means of accessing a bit mask of features, and one that
allows specification of a selection of features to be included in the mask, is
available via the CreateFeatureMask mask method. The CreateFeatureMask mask
method can return a McBitMask object, which allows fast indexed access to
foreground segments on all scan lines from one array (by contrast this method
requires a call that creates an array for each scan line).
This method is useful for figuring out which pixels of a non-rectangular regions
lie within the bounds. By calling GetLineSegments for every line in the bounds,
one can determine where the regions start and end along the line, from left to
right. Each start and end-point pair defines a segment.
See Also