Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
GHWels
Posts: 32
Joined: Thu Apr 09, 2015 7:57 am

Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)

Post by GHWels » Fri Jul 24, 2015 2:52 pm

Hallo Alex

I want to draw on a AnnotationViewer a

LinesAnnotationData from PointF(0,0) to PointF(500,500)

Gunther
Best regards, GHWels

Alex
Site Admin
Posts: 1445
Joined: Thu Jul 10, 2008 2:21 pm

Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)

Post by Alex » Fri Jul 24, 2015 4:51 pm

Hello Gunther,

Do you want to draw annotation using mouse or programmatically?

Best regards, Alexander

GHWels
Posts: 32
Joined: Thu Apr 09, 2015 7:57 am

Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)

Post by GHWels » Sat Jul 25, 2015 2:12 am

Hello Alex!

programmatically

Gunther
Best regards, GHWels

Alex
Site Admin
Posts: 1445
Joined: Thu Jul 10, 2008 2:21 pm

Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)

Post by Alex » Mon Jul 27, 2015 10:51 am

Hello Gunther,

Here is a code snippet that shows how to create lines annotation programmatically:

Code: Select all

// create lines annotation
LinesAnnotationData linesAnnoData = new LinesAnnotationData();
// specify points of lines annotation
linesAnnoData.Points.Add(new PointF(0, 0));
linesAnnoData.Points.Add(new PointF(500, 500));

// create view of lines annotation
LinesAnnotationView linesAnnoView = new LinesAnnotationView(linesAnnoData);

// get reference to annotation view collection of first image
AnnotationViewCollection annoViews = annotationViewer1.AnnotationViewController[0];
// add lines annotation view to annotation view collection of first image
annoViews.Add(linesAnnoView);
Best regards, Alexander

GHWels
Posts: 32
Joined: Thu Apr 09, 2015 7:57 am

Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)

Post by GHWels » Mon Jul 27, 2015 11:41 am

Thank you, it works.
Gunther
Best regards, GHWels

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest