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



Gets the pixel count of the annotation object

Syntax

Visual Basic (Declaration) 
Public Function GetArea() As Single
Visual Basic (Usage)Copy Code
Dim instance As AnnObject
Dim value As Single
 
value = instance.GetArea()
C# 
public float GetArea()
C++/CLI 
public:
float GetArea(); 

Return Value

the pixel count of the annotation object

Example

This sample creates a rectangle with dimensions 100 x 100 and then displays the area.

Visual BasicCopy Code
Public Sub AnnObject_GetArea()
   Dim annRectangleObject As AnnRectangleObject = New AnnRectangleObject()
   annRectangleObject.Bounds = New AnnRectangle(0, 0, 100, 100)
   Dim s As String = String.Format("Area of Rectangle: {0}", annRectangleObject.GetArea().ToString())
   MessageBox.Show(s)
End Sub
C#Copy Code
public void AnnObject_GetArea()
{
   AnnRectangleObject annRectangleObject = new AnnRectangleObject();
   annRectangleObject.Bounds = new AnnRectangle(0, 0, 100, 100);
   string s = String.Format("Area of Rectangle: {0}", annRectangleObject.GetArea().ToString());
   MessageBox.Show(s);
}

Remarks

The pixel count is the number of pixels contained in a region extracted from the annotation object, without resizing.

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