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 looked at your Annotation demo where they are added visually but the size of the annotation is always zero...Please read the "Getting Started" topic in the VintaSoftAnnotation.NET Plug-in section of documentation.
I can set colour but not size...AnnotationBase class has the Size property - use it to change annotation size. Also please read the documentation!
I also don't want users to be able to re-size or rotate...You can set the AnnotationViewer.SelectionMode property to the SelectionMode.Tool value and users will be not able to change annotations.
// get a hold of the Image being displayed
VintasoftImage vi = annotationViewer1.Images[annotationViewer1.FocusedIndex];
// determine widths of canvas and image.
int av_width = annotationViewer1.ClientSize.Width;
int av_height = annotationViewer1.ClientSize.Height;
int im_width = vi.Width;
int im_height = vi.Height;
// calculate Image offset
int x0 = (av_width > im_width ? (av_width - im_width) / 2 : 0);
int y0 = (av_height > im_height ? (av_height - im_height) / 2 : 0);
// get your mouse Point
Point mp = annotationViewer1.PointToClient(Control.MousePosition);
// get the translated location
Point annotationLocation = new PointF(mp.X - x0, mp.Y - y0);