LEADTOOLS Support
Imaging
Imaging SDK Examples
HOW TO: Convert from Client to Bitmap Coordinates with the LBitmapWindow Class
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, June 9, 2010 6:20:54 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
Here's a C++ code snippet of how to convert a point in client coordinates to bitmap coordinates with the 16.5 C++ Class Library interface's LBitmapWindow class. LMyBitmapWindow is an inherited class of LBitmapWindow.
POINT LMyBitmapWindow::ClientToBitmap(POINT ptClient)
{
POINT ptBitmap;
CRect Dst;
GetRects(NULL, NULL, &Dst, NULL);
ptBitmap.x = (ptClient.x - Dst.left) * GetWidth() / Dst.Width();
ptBitmap.y = (ptClient.y - Dst.top) * GetHeight() / Dst.Height();
return ptBitmap;
}
LEADTOOLS Support
Imaging
Imaging SDK Examples
HOW TO: Convert from Client to Bitmap Coordinates with the LBitmapWindow Class
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.