Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, September 4, 2011 8:34:03 AM(UTC)


Groups: Registered
Posts: 1

AnnPicture pic = new AnnPicture(img);

AnnStampObject annImg = new AnnStampObject();
annImg.Pen = new AnnPen(this.OUTLINE_DEFAULT_COLOR, new AnnLength(OUTLINE_DEFAULT_WIDTH));
annImg.Bounds = new AnnRectangle(x, y, widthF, heightF);
annImg.Picture = pic;

is it possible?
if it is not possible, i want to know how do i?
is it possible by Custom annotation?

.net framework 4.0 , c#
leadtools 17.5 & window form

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, September 5, 2011 5:21:16 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

You can do this by creating an AnnRectangleObject object (represents the outline) and an AnnStampObject (contains the image), and then add the two objects to an AnnGroupObject and add the group object to the annotation Container. The following code does this:
//Create annotation rectangle object
AnnRectangleObject rect = new AnnRectangleObject();
rect.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel));
rect.Brush = new AnnSolidBrush(Color.Red);
rect.Bounds = new AnnRectangle(90, 190, 420, 620, AnnUnit.Pixel);
//Create annotation stamp object
AnnStampObject stamp = new AnnStampObject();
AnnPicture pic = new AnnPicture(Image.FromFile(@"C:\LEADTOOLS Images\cannon.jpg"));
pic.TransparentMode = AnnPictureTransparentMode.None;
pic.TransparentColor = Color.Black;
stamp.Picture = pic;
stamp.Pen = new AnnPen(Color.Red,new AnnLength(3,AnnUnit.Pixel));
stamp.LineAlignment = StringAlignment.Center;
stamp.Text = "LEADTOOLS";
stamp.Bounds = new AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel);

//create a group object
AnnGroupObject group = new AnnGroupObject();

//Add the group object to the annotation container

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-2021, Yet Another Forum.NET
This page was generated in 0.092 seconds.