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
if (e.Button == MouseButtons.Right)
{
ImageCollection objImageCollection = new ImageCollection();
AnnotationDataController objAnnotationDataController = new AnnotationDataController(annotationViewer1.Images);
objImageCollection.Add("AnnotationDot_Green.png");
PointF objPointF = new PointF(e.X, e.Y);
AnnotationDataCollection objAnnotationDataCollection = objAnnotationDataController[objImageCollection.Count - 1];
RectangleAnnotationData objRectangleAnnotationData = new RectangleAnnotationData();
objRectangleAnnotationData.Size = new SizeF(30, 30);
objRectangleAnnotationData.FillBrush = new AnnotationSolidBrush(Color.AliceBlue);
objRectangleAnnotationData.Location = annotationViewer1.PointFromControlToDip(objPointF);
objAnnotationDataCollection.Add(objRectangleAnnotationData);
}
string _embeddedOrReferencedImageFileName = string.Empty;
if (string.IsNullOrEmpty(_embeddedOrReferencedImageFileName))
_embeddedOrReferencedImageFileName = @"D:\Dixit\Projects\VintasoftDemoApp_RiskAdjustment\VintasoftDemoApp_RiskAdjustment - Copy\AnnotationDot_Green.png";
ReferencedImageAnnotationData referencedImage = new ReferencedImageAnnotationData();
referencedImage.Size = new SizeF(25, 25);
referencedImage.Location = annotationViewer1.PointFromControlToDip(objPoint);
referencedImage.Filename = _embeddedOrReferencedImageFileName;
if (referencedImage != null)
{
AnnotationViewer.AddAndBuildAnnotation(referencedImage);
}