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
- 
				GHWels
 - Posts: 41
 - Joined: Thu Apr 09, 2015 7:57 am
 
- 
				Alex
 - Site Admin
 - Posts: 2442
 - Joined: Thu Jul 10, 2008 2:21 pm
 
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
- 
				GHWels
 - Posts: 41
 - Joined: Thu Apr 09, 2015 7:57 am
 
Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Hello Alex!
programmatically
Gunther
			
			
									
						
										
						programmatically
Gunther
- 
				Alex
 - Site Admin
 - Posts: 2442
 - Joined: Thu Jul 10, 2008 2:21 pm
 
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);
- 
				GHWels
 - Posts: 41
 - Joined: Thu Apr 09, 2015 7:57 am
 
Re: Draw LinesAnnotationData from PointF(0,0) to PointF(500,500)
Thank you, it works.
Gunther
			
			
									
						
										
						Gunther