Page 1 of 1
Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Posted: Fri Jul 24, 2015 2:52 pm
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)
Posted: Fri Jul 24, 2015 4:51 pm
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)
Posted: Sat Jul 25, 2015 2:12 am
by GHWels
Hello Alex!
programmatically
Gunther
Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Posted: Mon Jul 27, 2015 10:51 am
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
Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Posted: Mon Jul 27, 2015 11:41 am
by GHWels
Thank you, it works.
Gunther