SetRgnColor method (ILEADRaster)

Visual Basic example

Visual C++ 5.0 example

Delphi 4 example

C++ Builder example

 

Syntax

short SetRgnColor (OLE_COLOR crMatch, RgnCombineModeConstants CombineMode);

Overview

Refer to Creating and Using a Bitmap Region.

Remarks

Adds a region that consists of all pixels of a specified color.

You specify the color using a COLORREF value, which is a Windows-defined data type. You can also specify a palette index as explained in Using Palette Indexes As Color Values.

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

You can use this method to simulate the use of a transparent color as follows:

image\sqrblit.gif Call this method, with the transparent color in the crMatch parameter and L_RGN_SETNOT in the CombineMode parameter.

image\sqrblit.gif Use the Floater property and the FloaterVisible property to display and manipulate the region, which consists of every part of the bitmap, except the area with the specified color.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

SetRgnEllipse method, SetRgnRect method, SetRgnRoundRect method, PolygonSize property, OffsetRgn method

Topics:

Raster Images: Creating and Using a Region

 

Using Color Values in LEADTOOLS