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 : Tuesday, August 28, 2007 10:44:08 PM(UTC)

manju  
manju

Groups: Registered
Posts: 49


Hi,

I have one AnnRectangleObject I need to provide rotate points and gripper to this rectangle object how should I do it.I am using leadtools 15 and c# .net.
And if I use AnnAutomationManager.RectangleObjectId I will get the rotate points and gripper to recatangle but how should I get the changed or final area of the rectangle,start co-ordinates,width and height of rectangle if possible provide some sample code. Please reply soon.

Thanks
manju
 

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 : Wednesday, August 29, 2007 11:08:21 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Manju,

You can change the location of the center and gripper for the AnnRectangleObject by changing the AnnRectangleObject.RotateCenter and AnnRectangleObject.RotateGripper properties.

Also, do you mean that you want to get the final area, width and height of the AnnRectangleObject after drawing it?
You can get the bounding rectangle of the AnnRectangleObject after drawing it by using the AutomationAnn.CurrentEditObject.BoundingRectangle property.

If you are talking about something else, please provide me with more details about what exactly you are trying to do.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Thursday, August 30, 2007 1:14:31 AM(UTC)

manju  
manju

Groups: Registered
Posts: 49


I am using ,

AutomationAnn.Manager.CurrentObjectId = AnnAutomationManager.RectangleObjectId;

to display rectangle on image but how should i get co-ordinates of that rectangle???
 
#4 Posted : Saturday, September 1, 2007 11:04:21 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello,

Do you mean that you want to get the coordinates of that AnnRectangleObject directly after drawing it on the image?

Did you try to use the AutomationAnn.CurrentEditObject.BoundingRectangle property?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Monday, September 3, 2007 4:02:37 AM(UTC)

manju  
manju

Groups: Registered
Posts: 49


Hi,

Please check the below code snippet,

AnnStampObject stamp = new AnnStampObject();
stamp.Pen = new AnnPen(Color.Red, new AnnLength(10));
stamp.Brush = null;
stamp.Font = new AnnFont("Arial", new AnnLength(10, AnnUnit.Point), FontStyle.Regular);
stamp.Alignment = StringAlignment.Center;
stamp.Picture = new AnnPicture(Image.FromFile("c:\\PE5.jpg"));
stamp.LineAlignment = StringAlignment.Center;
stamp.Bounds = new AnnRectangle(50, 50, 100, 100, AnnUnit.Pixel/* .Pixel*/);
cotainer.Objects.Add(stamp);
stamp.Draw(rasterImageViewer1.Image.CreateGdiPlusGraphics().Graphics);


This code will disply static stamp rectangle on an image how should I provide gripper and rotate points to this stamp rectangle so that I can rotate that stamp. I dont want to use
AutomationAnn.Manager.CurrentObjectId = AnnAutomationManager.StampObjectId;

I need to provide my own properties window.so how should I get rotate points and gripper to stamp object.Please reply soon.

Thanks
Manju
 
#6 Posted : Tuesday, September 4, 2007 5:10:42 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

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

Hello Manju,

To set the rotate points and Gripper of the AnnStampObject in non-automated mode, you need to add the AnnStampObject on the AnnContainer. and then create and define AnnEditDesigner and AnnDrawDesigner objects and connect them with the AnnStampObject.

Please read the following help topic in the LEADTOOLS .Net documentation:
- Implementing Non Automated Annotation Program
This help topic shows how to create and show non-automated annotations.

Also, the following help topic shows how to create and the AnnEditDesigner and AnnDrawDesigner with a custom annotation object:
- Implementing User Defined Objects with LEADTOOLS Annotations

Thanks,
Maen Badwan
LEADTOOLS Technical Suppor
 
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.057 seconds.