LEADTOOLS Annotations (Leadtools.Annotations assembly)
LEAD Technologies, Inc

GetPolyRulerLength Method

Example 





Poly ruler points.
The desired measurement unit.
Unit converter to use.
Helper method to get the total length of a poly ruler.
Syntax
public static AnnLength GetPolyRulerLength( 
   RasterCollection<AnnPoint> points,
   AnnUnit measurementUnit,
   AnnUnitConverter converter
)
'Declaration
 
Public Shared Function GetPolyRulerLength( _
   ByVal points As RasterCollection(Of AnnPoint), _
   ByVal measurementUnit As AnnUnit, _
   ByVal converter As AnnUnitConverter _
) As AnnLength
'Usage
 
Dim points As RasterCollection(Of AnnPoint)
Dim measurementUnit As AnnUnit
Dim converter As AnnUnitConverter
Dim value As AnnLength
 
value = AnnPolyRulerObject.GetPolyRulerLength(points, measurementUnit, converter)
public static AnnLength GetPolyRulerLength( 
   RasterCollection<AnnPoint> points,
   AnnUnit measurementUnit,
   AnnUnitConverter converter
)
 function Leadtools.Annotations.AnnPolyRulerObject.GetPolyRulerLength( 
   points ,
   measurementUnit ,
   converter 
)
public:
static AnnLength GetPolyRulerLength( 
   RasterCollection<AnnPoint>^ points,
   AnnUnit measurementUnit,
   AnnUnitConverter^ converter
) 

Parameters

points
Poly ruler points.
measurementUnit
The desired measurement unit.
converter
Unit converter to use.

Return Value

An AnnLength object that contains the total length of the poly ruler in the desired measurement units.
Remarks

GetPolyRulerLength is a helper method that can be used to obtain the total length of a poly ruler object.

Example
 
Private Sub GetPolyRulerLengthExample(ByVal container As AnnContainer, ByVal polyRuler As AnnPolyRulerObject)
   ' Get the total length in inches
   Dim totalLength As AnnLength = AnnPolyRulerObject.GetPolyRulerLength( _
      polyRuler.Points, _
      AnnUnit.Inch, _
      container.UnitConverter)
   MessageBox.Show("Total length is " + totalLength.ToString())
End Sub
private void GetPolyRulerLengthExample(AnnContainer container, AnnPolyRulerObject polyRuler)
{
   // Get the total length in inches
   AnnLength totalLength = AnnPolyRulerObject.GetPolyRulerLength(
      polyRuler.Points,
      AnnUnit.Inch,
      container.UnitConverter);
   MessageBox.Show("Total length is " + totalLength.ToString());
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

AnnPolyRulerObject Class
AnnPolyRulerObject Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.