This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, March 30, 2012 8:09:29 AM(UTC)
Groups: Registered
Posts: 37
Hi
Title pretty much says it. Is there an equivalent to this in the C++ library toolkit?
I need to do what this gentlemen described in the last post.
http://support.leadtools.com/CS/forums/18791/ShowPost.aspx
I am using v17.5 with MFC.
Thanks
#2
Posted
:
Monday, April 2, 2012 6:02:14 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
There is no exact equivalent for AnnTransformer in the C++ classes. There are methods that perform similar functions, such as the following members of LAnnotation:
GetOffsetX
GetOffsetY
GetScalarX
GetScalarY
SetOffsetX
SetOffsetY
SetScalarX
SetScalarY
See the help topic "Low-Level Coordinate System for Annotations" in the main Class Library help file.
Please give me more details about what you're trying to do, and I can try to help you do it using our functions.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Monday, April 2, 2012 9:41:25 AM(UTC)
Groups: Registered
Posts: 37
What I have is a LBitmapWindow that is displaying a bitmap. The zoom mode is set to ZOOM_FIT. Since in this mode, padding is automatically added to maintain the aspect ratio, I need some way to get the actual size of the bitmap in screen coordinates to do some calculations. If I change the zoom mode to ZOOM_STRETCH, I can call GetClienttRect and get the size of the control that is parent to the bitmap and do my calculations that way but if the user re-sizes the control I of course lose the aspect ratio.
Thanks
#4
Posted
:
Monday, April 2, 2012 11:01:54 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
If you want to convert from client coordinates to bitmap coordinates, and not specifically for an annotations object, you can use the formula in this forum post:
http://support.leadtools.com/cs/forums/34411/ShowPost.aspx
You can also use the same rectangles to do the inverse calculation from bitmap to client coordinates if you need it.
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#5
Posted
:
Tuesday, April 3, 2012 6:24:49 AM(UTC)
Groups: Registered
Posts: 37
Maen,
Thank you, that is what I was looking for.
tbecker82
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.