LEADTOOLS Annotations (Leadtools.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
BoundingRectangle Property
See Also 
Leadtools.Annotations Namespace > AnnObject Class : BoundingRectangle Property



The BoundingRectangle Property is available in LEADTOOLS Document and Medical Imaging toolkits.

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;}
C++/CLI 
public:
virtual property AnnRectangle BoundingRectangle {
   AnnRectangle get();
}

Property 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 AnnObject.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 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

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