#include "ltwrappr.h"
virtual L_INT LPaint::ColorRgn(crRgnColor, pXForm =NULL)
COLORREF crRgnColor; |
color value |
pRGNXFORM pXForm; |
pointer to a coordinate translation structure |
Highlights a region by displaying a filled, color representation of the region.
Parameter |
Description |
crRgnColor |
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) |
pXForm |
Pointer to an RGNXFORM structure that LEADTOOLS uses to translate between display coordinates and bitmap coordinates. |
|
If you specify NULL in this parameter, the scalar fields default to 1, the offsets default to 0, and the view perspective defaults to the bitmap's view perspective. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
This function is particularly useful when displaying regions with black and white images. All black pixels in a region are displayed with color crRgnColor, and all white pixels are displayed ~(crRgnColor). For example, suppose that crRgnColor is light green (BGR 0x80FF40). All black pixels in the region are displayed as crRgnColor. All white pixels in the region are displayed as 0xFFFFFF XOR 0x80FF40 = 0x7F00BF, which is purple.
Required DLLs and Libraries
LTDIS For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
Functions: |
|
Topics: |
|
|
|
|
//The following should be part of the WM_PAINT processing //m_Bitmap is an object of type LBitmap and it contains a valid bitmap
L_INT LPaint_ColorRgnExample(LBitmap *pBitmap, HDC hDC)
{
L_INT nRet = 0;
LPaint MyPaint(pBitmap, hDC);
nRet = MyPaint.PaintDC();
if(nRet != SUCCESS)
return nRet;
if (pBitmap->HasRgn())
{
nRet = MyPaint.ColorRgn(RGB(255,0,0), NULL);
if(nRet != SUCCESS)
return nRet;
}
return SUCCESS;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.