#include "l_bitmap.h"
L_LTDIS_API L_BOOL L_IsPtInBitmapRgn(pBitmap, nRow, nCol)
pBITMAPHANDLE pBitmap; |
pointer to the bitmap handle |
L_INT nRow; |
row number of the pixel |
L_INT nCol; |
column number of the pixel |
Determines whether the specified pixel is in the bitmap region.
Parameter |
Description |
pBitmap |
Pointer to the bitmap handle referencing the bitmap that has the region. |
nRow |
The row number of the pixel. |
nCol |
The column number of the pixel. |
TRUE |
The specified pixel is in the region. |
FALSE |
The specified pixel is outside the region. |
This function uses bitmap coordinates to specify the pixel. Therefore, you must account for the view perspective of the bitmap. For more information, refer to Accounting for View Perspective.
Required DLLs and Libraries
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, Linux.
Functions: |
L_FrameBitmapRgn, L_BitmapHasRgn, L_FreeBitmapRgn, L_GetBitmapRgnArea |
Topics: |
|
|
|
|
L_INT IsPtInBitmapRgnExample(pBITMAPHANDLE LeadBitmap,
L_INT BitmapX,
L_INT BitmapY,
L_INT DisplayWidth,
L_INT DisplayHeight,
L_INT DisplayLeft,
L_INT DisplayTop)
{
L_INT nRet;
/* Translate mouse positions to bitmap coordinates */
BitmapX *= BITMAPWIDTH(LeadBitmap) / (DisplayWidth - DisplayLeft);
BitmapY *= BITMAPHEIGHT(LeadBitmap) / (DisplayHeight - DisplayTop);
/* Adjust for view perspective */
nRet = L_PointToBitmap ( LeadBitmap, TOP_LEFT, &BitmapX, &BitmapY );
if(nRet != SUCCESS)
return nRet;
/* Display a message if the point is in the region */
if (L_IsPtInBitmapRgn(LeadBitmap, BitmapY, BitmapX))
MessageBox (NULL, TEXT("Point is in region"), TEXT("Notice"), MB_OK);
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.