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, December 22, 2010 6:28:01 AM(UTC)
tteveris

Groups: Registered
Posts: 32


Using the Class library and the LBitmapWindow how does one map GDI coordinates after using the ::CreateLeadDC().

Lets say a want to draw using MoveTo, LineTo, etc and the x/y units were pixels in the range of the image being displayed. Will they match up to the image no matter what the size, zoom level, etc.

I have not actually done any of this work but just wondering what I need to do. Any help is greatly appreciated.

 

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.

#2 Posted : Thursday, December 23, 2010 1:28:09 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

The coordinates would be in bitmap pixels.
This means if you create a LEAD DC from a bitmap that's 500x500 pixels, the pixel coordinate range will be from 0 to 499.

The values do not depend on the displayed image's zoom level or scroll values.
 
#3 Posted : Friday, January 7, 2011 7:46:04 AM(UTC)
tteveris

Groups: Registered
Posts: 32


Ok, that works BUT how do I map mouse moves I capture via the MsgProcCallBack function to the image coordinates. I'm looking to provide the user with a means to select an area (rectangle) on the image to do special processing. I will also be allowing zoom in/out feature via the Lead functions. 
 
 
#4 Posted : Sunday, January 9, 2011 6:40:30 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

See the following post for a way to convert from mouse to bitmap coordinates:
http://support.leadtools.com/SupportPortal/cs/forums/5309/ShowPost.aspx
 
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.100 seconds.