Defines an annotation polygon object.
Object Model
Syntax
Example
This example creates a new closed polygon object with 4 points.
Visual Basic | Copy Code |
---|
Private Sub AnnPolygonObject_AnnPolygonObject(ByVal container As AnnContainer)
Dim polygon As AnnPolygonObject = New AnnPolygonObject()
polygon.Points.Add(New AnnPoint(100, 100, AnnUnit.Pixel))
polygon.Points.Add(New AnnPoint(200, 100, AnnUnit.Pixel))
polygon.Points.Add(New AnnPoint(200, 200, AnnUnit.Pixel))
polygon.Points.Add(New AnnPoint(100, 300, AnnUnit.Pixel))
polygon.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))
polygon.Brush = New AnnSolidBrush(Color.White)
polygon.FillMode = FillMode.Alternate
polygon.Closed = True
container.Objects.Add(polygon)
End Sub |
C# | Copy Code |
---|
private void AnnPolygonObject_AnnPolygonObject(AnnContainer container) { AnnPolygonObject polygon = new AnnPolygonObject(); polygon.Points.Add(new AnnPoint(100, 100, AnnUnit.Pixel)); polygon.Points.Add(new AnnPoint(200, 100, AnnUnit.Pixel)); polygon.Points.Add(new AnnPoint(200, 200, AnnUnit.Pixel)); polygon.Points.Add(new AnnPoint(100, 300, AnnUnit.Pixel)); polygon.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel)); polygon.Brush = new AnnSolidBrush(Color.White); polygon.FillMode = FillMode.Alternate; polygon.Closed = true; container.Objects.Add(polygon); } |
Remarks
Inheritance Hierarchy
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also