LEADTOOLS Support
General
General Questions
Convert Client Coordinates to Bitmap Coordinates
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, May 4, 2011 11:29:41 AM(UTC)
Groups: Registered, Tech Support
Posts: 207
Was thanked: 3 time(s) in 3 post(s)
Many of our functions/classes take coordinates in image coordinates or bitmap coordinates. The values need to be from 0, 0 to Image.Width, Image.Height.
However, in mouse events (mouse up, mouse down, mouse move, etc) the coordinates given as parameter are in client coordinates. They will range from 0,0 to ImageViewer.Width, ImageViewer.Height.
This demo shows you how to convert from the client coordinate system to the image coordinate system in the mouse move event. The coordinates for both are displayed in the status strip. To see the effect you will want to load a large image and either scroll it, or have the viewer fit the image to the screen.
This demo is written in C# as
Visual Studio 2008 - x86 and x64
Visual Studio 2010 - x86 and x64
Travis Montgomery
Senior Sales Engineer
LEADTOOLS Support
General
General Questions
Convert Client Coordinates to Bitmap Coordinates
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.