Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
GetArea Method
See Also  Example
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 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

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