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
I want to draw on a AnnotationViewer aYou can set the start point of ruler annotation (line-based annotation) using the LineAnnotationData.StartPoint property:
RulerAnnotation from PointF(0,0) to PointF(500,0) programmatically.
// create an image Vintasoft.Imaging.VintasoftImage image = new Vintasoft.Imaging.VintasoftImage(1000, 1000); // add the image to the annotation viewer annotationViewer1.Images.Add(image); // create the ruler annotation Vintasoft.Imaging.Annotation.RulerAnnotationData rulerAnnotationData = new Vintasoft.Imaging.Annotation.RulerAnnotationData(); // coordinate in pixels float coordinateInPixels = 500; // coordinate in DIP (device independent pixels) float coordinateInDips = coordinateInPixels * 96 / image.Resolution.Horizontal; // set the ruler coordinates rulerAnnotationData.StartPoint = new System.Drawing.PointF(0, 0); rulerAnnotationData.EndPoint = new System.Drawing.PointF(0, coordinateInDips); // add the ruler annotation to the image in annotation viewer int imageIndex = 0; annotationViewer1.AnnotationDataController[imageIndex].Add(rulerAnnotationData);Best regards, Alexander
... // add the ruler annotation to the image in annotation viewer int imageIndex = 0; annotationViewer1.AnnotationDataController[imageIndex].Add(rulerAnnotationData);Best regards, Alexander