Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, May 4, 2011 11:29:41 AM(UTC)

Travis  
Travis

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
File Attachment(s):
Client To Bitmap coordinates.zip (19kb) downloaded 82 time(s).
Travis Montgomery
Senior Sales Engineer
LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.035 seconds.