VintaSoft Annotation .NET Plug-in Discussions

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

Board index < VintaSoft Imaging < VintaSoft Annotation .NET Plug-in Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

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



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


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


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

Post by GHWels »

Hello Alex!

programmatically

Gunther


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:
// 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


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

Post by GHWels »

Thank you, it works.
Gunther


Page 1 from 1: 1