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 : Friday, March 30, 2012 8:09:29 AM(UTC)
tbecker82

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
 

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 : Monday, April 2, 2012 6:02:14 AM(UTC)
Maen Hasan

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)
tbecker82

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)
Maen Hasan

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)
tbecker82

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.

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