Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.3.5
FillRegion(IntPtr,RasterRegionXForm,RasterColor) Method
See Also 
Leadtools Namespace > RasterImage Class > FillRegion Method : FillRegion(IntPtr,RasterRegionXForm,RasterColor) Method




hdc
Windows device context handle where the image is displayed and where the frame is to appear.
xform
RasterRegionXForm object that LEADTOOLS uses to translate between display coordinates and image coordinates.
color
The color value to be XORed with colors within a region to determine the new colors for displaying the region. The color corresponding to a particular part of the region is determined as follows: Region Color Displayed = (color of pixel in region) XOR (crRgnColor)
Highlights a region by displaying a filled, color representation of the region in the given Windows device context handle.

Syntax

Visual Basic (Declaration) 
Public Overloads Sub FillRegion( _
   ByVal hdc As IntPtr, _
   ByVal xform As RasterRegionXForm, _
   ByVal color As RasterColor _
) 
Visual Basic (Usage)Copy Code
Dim instance As RasterImage
Dim hdc As IntPtr
Dim xform As RasterRegionXForm
Dim color As RasterColor
 
instance.FillRegion(hdc, xform, color)
C# 
public void FillRegion( 
   IntPtr hdc,
   RasterRegionXForm xform,
   RasterColor color
)
Managed Extensions for C++ 
public: void FillRegion( 
   IntPtr hdc,
   RasterRegionXForm* xform,
   RasterColor color
) 
C++/CLI 
public:
void FillRegion( 
   IntPtr hdc,
   RasterRegionXForm^ xform,
   RasterColor color
) 

Parameters

hdc
Windows device context handle where the image is displayed and where the frame is to appear.
xform
RasterRegionXForm object that LEADTOOLS uses to translate between display coordinates and image coordinates.
color
The color value to be XORed with colors within a region to determine the new colors for displaying the region. The color corresponding to a particular part of the region is determined as follows: Region Color Displayed = (color of pixel in region) XOR (crRgnColor)

Example

For an example, refer to FrameRegion.

Remarks

This method is particularly useful when displaying regions with black and white images. All black pixels in a region are displayed with color specified by color. and all white pixels are displayed ~(color). For example, suppose that color is light green (BGR 0x80FF40). All black pixels in the region are displayed as color. All white pixels in the region are displayed as 0xFFFFFF XOR 0x80FF40 = 0x7F00BF, which is purple.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also