Defines an annotation polygon object.
public class AnnPolygonObject : IAnnPolygon, AnnPolylineObject Public Class AnnPolygonObjectInherits Leadtools.Windows.Annotations.AnnPolylineObjectImplements Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPolygon, Leadtools.Windows.Annotations.IAnnPolyline
The polygon object is a simple polygon that contains a collection of System.Windows.Point points, a stroke and a fill. The polygon can be IsClosed or not, and can also have a certain FillRule. For an illustration of the different fill modes, refer to FillRule enumeration.
For more information about the polygon annotation object refer to AnnPolygonObject for WPF. For more information about the automated polygon annotation object, refer to WPF Annotation Objects - Automated Features.
This example creates a new closed polygon object with 4 points.
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;private void AnnPolygonObject_AnnPolygonObject(AnnContainer container){AnnPolygonObject polygon = new AnnPolygonObject();polygon.Points.Add(new Point(100, 100));polygon.Points.Add(new Point(200, 100));polygon.Points.Add(new Point(200, 200));polygon.Points.Add(new Point(100, 300));polygon.Stroke = Colors.Red;polygon.Fill = Colors.White;polygon.FillRule = AnnFillRule.EvenOdd;polygon.StrokeThickness = 1.0;polygon.IsClosed = true;container.Children.Add(polygon);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnPolygonObject_AnnPolygonObject(ByVal container As AnnContainer)Dim polygon As AnnPolygonObject = New AnnPolygonObject()polygon.Points.Add(New System.Windows.Point(100, 100))polygon.Points.Add(New System.Windows.Point(200, 100))polygon.Points.Add(New System.Windows.Point(200, 200))polygon.Points.Add(New System.Windows.Point(100, 300))polygon.Stroke = Colors.Redpolygon.StrokeThickness = 1.0polygon.Fill = Colors.Whitepolygon.FillRule = AnnFillRule.EvenOddpolygon.IsClosed = Truecontainer.Children.Add(polygon)End Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;//using Leadtools.Help;private void AnnPolygonObject_AnnPolygonObject(AnnContainer container){AnnPolygonObject polygon = new AnnPolygonObject();polygon.Points.Add(new Point(100, 100));polygon.Points.Add(new Point(200, 100));polygon.Points.Add(new Point(200, 200));polygon.Points.Add(new Point(100, 300));polygon.Stroke = Colors.Red;polygon.Fill = Colors.White;polygon.FillRule = AnnFillRule.EvenOdd;polygon.StrokeThickness = 1.0;polygon.IsClosed = true;container.Children.Add(polygon);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnPolygonObject_AnnPolygonObject(ByVal container As AnnContainer)Dim polygon As AnnPolygonObject = New AnnPolygonObject()polygon.Points.Add(New Point(100, 100))polygon.Points.Add(New Point(200, 100))polygon.Points.Add(New Point(200, 200))polygon.Points.Add(New Point(100, 300))polygon.Stroke = Colors.Redpolygon.Fill = Colors.Whitepolygon.FillRule = AnnFillRule.EvenOddpolygon.StrokeThickness = 1.0polygon.IsClosed = Truecontainer.Children.Add(polygon)End Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
