Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
BoundingRectangle Property
See Also  Example
Leadtools.Annotations Namespace > AnnObject Class : BoundingRectangle Property




Gets the logical bounding rectangle of this AnnObject.

Syntax

Visual Basic (Declaration) 
Public Overridable ReadOnly Property BoundingRectangle As AnnRectangle
Visual Basic (Usage)Copy Code
Dim instance As AnnObject
Dim value As AnnRectangle
 
value = instance.BoundingRectangle
C# 
public virtual AnnRectangle BoundingRectangle {get;}
Managed Extensions for C++ 
public: __property virtual AnnRectangle get_BoundingRectangle();
C++/CLI 
public:
virtual property AnnRectangle BoundingRectangle {
   AnnRectangle get();
}

Return Value

An AnnRectangle structure that represents the logical bounding rectangle of this AnnObject.

Example

This example will add a new annotation rectangle object at the bounding rectangle of another annotation object, offeset by 20.

Visual BasicCopy Code
Public Sub AnnObject_BoundingRectangle(ByVal obj As AnnObject)
   Dim rc As AnnRectangle = obj.BoundingRectangle
   Dim rectObj As AnnRectangleObject = New AnnRectangleObject()
   rc.Offset(20, 20)
   rectObj.Bounds = rc
   rectObj.Pen = New AnnPen(Color.Red, New AnnLength(3, AnnUnit.Pixel))
   rectObj.Name = "New Rectangle"
   obj.Container.Objects.Add(rectObj)
End Sub
C#Copy Code
public void AnnObject_BoundingRectangle(AnnObject obj) 

   AnnRectangle rc = obj.BoundingRectangle; 
   AnnRectangleObject rectObj = new AnnRectangleObject(); 
   rc.Offset(20, 20); 
   rectObj.Bounds = rc; 
   rectObj.Pen = new AnnPen(Color.Red, new AnnLength(3, AnnUnit.Pixel)); 
   rectObj.Name = "New Rectangle"; 
   obj.Container.Objects.Add(rectObj); 
}

Remarks

(Read only) This method returns the logical bounding rectangle of this AnnObject. This rectangle is the bounding rectangle of the graphics path returned from the GetGraphicsPath method with a AnnGetGraphicsPathMode value of Bound. This bounding rectangle is also used to calculate the logical Origin of this AnnObject.

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

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features