AddAndBuildAnnotation(AnnotationView) Method (AnnotationViewer)
Adds annotation to the annotation collection of focused image and starts building of annotation.
Here is an example that shows how to add an ellipse annotation to the annotation collection of focused image and start building of annotation.
Private Sub buildEllipseAnnotationButton_Click(sender As Object, e As System.EventArgs)
' create the ellipse annotation data
Dim ellipseAnnotationData As New Vintasoft.Imaging.Annotation.EllipseAnnotationData()
' create the ellipse annotation view
Dim ellipseAnnotationView As Vintasoft.Imaging.Annotation.UI.EllipseAnnotationView = DirectCast(Vintasoft.Imaging.Annotation.UI.AnnotationViewFactory.CreateView(ellipseAnnotationData), Vintasoft.Imaging.Annotation.UI.EllipseAnnotationView)
' add annotation to the annotation collection of focused image and
' start building of annotation
annotationViewer1.AddAndBuildAnnotation(ellipseAnnotationView)
End Sub
private void buildEllipseAnnotationButton_Click(object sender, System.EventArgs e)
{
// create the ellipse annotation data
Vintasoft.Imaging.Annotation.EllipseAnnotationData ellipseAnnotationData =
new Vintasoft.Imaging.Annotation.EllipseAnnotationData();
// create the ellipse annotation view
Vintasoft.Imaging.Annotation.UI.EllipseAnnotationView ellipseAnnotationView =
(Vintasoft.Imaging.Annotation.UI.EllipseAnnotationView)Vintasoft.Imaging.Annotation.UI.AnnotationViewFactory.CreateView(ellipseAnnotationData);
// add annotation to the annotation collection of focused image and
// start building of annotation
annotationViewer1.AddAndBuildAnnotation(ellipseAnnotationView);
}
Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5