SetRgnPolygon method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int SetRgnPolygon (Cardinal uFillMode, Cardinal uCombineMode);

Delphi Syntax

SetRgnPolygon (uFillMode, uCombineMode: Cardinal): Integer;

Overview

Refer to Creating and Using a Bitmap Region.

Remarks

Adds a polygonal region to the bitmap.

With this method, you can either replace the current region or create a complex region by setting a Boolean flag that determines how the added region interacts with the existing region. For possible values, specified in the uCombineMode parameter, refer to Flags for Setting a Region.

To create a polygonal region, you must first build an ordered array of points for the vertices of the polygon; then create the region based on the array. The PolygonSize property specifies the size of the array. You can either specify a large array to start with, or you can increase the size of the array when necessary (without losing the existing points). For each vertex, you update the array by setting the following indexed PolygonPoint property.

You can then call the SetRgnPolygon method.

See Also

Elements:

SetRgnRoundRect method, SetRgnEllipse method, SetRgnRect method, SetRgnColor method, OffsetRgn method

Topics:

Raster Images: Creating and Using a Region