Defines an annotation rectangle object.
Object Model
Syntax
Example
This example creates a new rectangle object with top, left at 100, 200, width, height of 400, 600 pixels, a red pen and a white brush and then adds it to a container.
Visual Basic | Copy Code |
---|
Private Sub AnnRectangleObject_AnnRectangleObject(ByVal container As AnnContainer)
Dim rect As AnnRectangleObject = New AnnRectangleObject()
rect.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))
rect.Brush = New AnnSolidBrush(Color.White)
rect.Bounds = New AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel)
container.Objects.Add(rect)
End Sub |
C# | Copy Code |
---|
private void AnnRectangleObject_AnnRectangleObject(AnnContainer container) { AnnRectangleObject rect = new AnnRectangleObject(); rect.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel)); rect.Brush = new AnnSolidBrush(Color.White); rect.Bounds = new AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel); container.Objects.Add(rect); } |
Remarks
Inheritance Hierarchy
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also