Hallo Alex
I want to draw on a AnnotationViewer a
LinesAnnotationData from PointF(0,0) to PointF(500,500)
Gunther
Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Moderator: Alex
Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Hello Gunther,
Do you want to draw annotation using mouse or programmatically?
Best regards, Alexander
Do you want to draw annotation using mouse or programmatically?
Best regards, Alexander
Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Hello Alex!
programmatically
Gunther
programmatically
Gunther
Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Hello Gunther,
Here is a code snippet that shows how to create lines annotation programmatically:
Best regards, Alexander
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);
Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Thank you, it works.
Gunther
Gunther