GetBitmapClipSegments method (Main Control)

Visual Basic example
Visual C++ 4.0 example

Syntax VARIANT GetBitmapClipSegments (float y);

Overview:  Refer to Creating and Using a Bitmap Region

Remarks

Gets the segments contained in the region for a particular row.

Call this method only for those rows that are within the region. That is, only those rows from RgnTop to RgnTop + RgnHeight. For the rows not contained in the region, their clip segments will include the whole row.

The segments are returned as an array of pairs of horizontal offsets. The first point in the pair is the beginning of the segment (it is contained in the region). The last point in the pair is the end of the segment. To follow the Windows rules, the end of the segment is the first point NOT CONTAINED in the region.

In most regions, there will be one segment per row. However, some regions can have 0, 1, 2 or more segments.

For example, assume that for a particular row there are two segments. The VARIANT will be filled with 4 values. Let’s call them x0, x1, x2, x3. In this case:

The position is unscaled relative to the LEAD bitmap in memory.

The unit of measure is determined by the ScaleMode property.

See Also

Elements:  RgnTop property, RgnHeight property

Topics:  Raster Images: Creating and Using a Region