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, October 28, 2009 4:02:57 PM(UTC)

zzzkan  
zzzkan

Groups: Registered
Posts: 8


Environment: Leadtools v16.5 document imaging C++ class Library, VS 2005.  <p>


I load tif image in LAnnotationWindow and I create annotation objects. <p>


I want to rotate the annotaton objects with the image.<p>

but annotation objects does not rotate when the Image is rotate.<p>


How can i rotate all annotation objects with image ?
<p>

Please let me know.
 

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, October 29, 2009 6:35:10 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Try to rotate the annotation objects with the image by using the LAnnotation::Rotate method. This method rotates the annotation object.
For more information, please see the following online help topic:
http://www.leadtools.com/Help/LEADTOOLS/v16/Main/CLIB/Lannotat/LAnnotation__Rotate.htm

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Sunday, November 1, 2009 3:56:28 PM(UTC)

zzzkan  
zzzkan

Groups: Registered
Posts: 8


Thanks for reply.

i do rotate image and annotation objects using Rotate method as Following

//////////////////////////////////////////////////////

LAnnotationWindow LeadAnnWindow;
LAnnRectangle LeadRectangle;

CRect rect;
ANNRECT MyAnnRect;
ANNPOINT MyAnnPoint;

LeadAnnWindow.GetBitmapVisibleRect(&rect);
LeadRectangle.GetRect(&MyAnnRect);

MyAnnPoint.x = rect.left + rect.Width()/2;
MyAnnPoint.y = rect.top + rect.Height()/2;

LeadAnnWindow.Rotate(18000, ROTATE_RESIZE, 0);

m_AnnRect.Rotate(180, &MyAnnPoint);

/////////////////////////////////////////////////////////


But the result was not expected result.


i attached before and after rotation image


How can i rotate annotation object with the image?

zzzkan attached the following image(s):
rotation result.GIF
 
#4 Posted : Sunday, November 1, 2009 10:40:16 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

To resolve the problem, try to rotate the annotation object around the center of the LAnnotationWindow. Please try the same issue by using the following code:
+------------+
LAnnotationWindow LeadAnnWindow;
...
ANNPOINT MyAnnPoint;

MyAnnPoint.x =  LeadAnnWindow.GetWidth()/2;
MyAnnPoint.y = LeadAnnWindow.GetHeight()/2;

LeadAnnWindow.Rotate(18000, ROTATE_BICUBIC, 0);

m_AnnRect.Rotate(180, &MyAnnPoint);
...
+------------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Sunday, November 1, 2009 11:21:37 PM(UTC)

zzzkan  
zzzkan

Groups: Registered
Posts: 8


Thank you for your quick reply.

I have one more question.

In case rotation angle is 90, this way is applicable ?
 
#6 Posted : Monday, November 2, 2009 12:53:10 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Yes, the code should work correctly when the rotation angle is 90.
Please let me know if you face any problem.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
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-2020, Yet Another Forum.NET
This page was generated in 0.126 seconds.