This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, October 28, 2009 3:57:57 PM(UTC)
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.
#2
Posted
:
Thursday, October 29, 2009 6:30:10 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
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:51:28 PM(UTC)
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):
#4
Posted
:
Sunday, November 1, 2009 10:35:16 PM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
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:16:37 PM(UTC)
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:48:10 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
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.