This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, December 22, 2010 6:28:01 AM(UTC)
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.
#2
Posted
:
Thursday, December 23, 2010 1:28:09 AM(UTC)
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)
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)
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.