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: 38
Joined: Thu Apr 09, 2015 7:57 am

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

Post by GHWels »

Hallo Alex

I want to draw on a AnnotationViewer a

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

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

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

Post by Alex »

Hello Gunther,

Do you want to draw annotation using mouse or programmatically?

Best regards, Alexander
GHWels
Posts: 38
Joined: Thu Apr 09, 2015 7:57 am

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

Post by GHWels »

Hello Alex!

programmatically

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

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

Post by Alex »

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: 38
Joined: Thu Apr 09, 2015 7:57 am

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

Post by GHWels »

Thank you, it works.
Gunther
Post Reply