Error processing SSI file
LEADTOOLS Annotations (Leadtools.Annotations assembly)

Show in webframe

GetPolyRulerLength Method






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
) 

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
Copy Code  
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.Codecs
Imports Leadtools.WinForms

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
using Leadtools;
using Leadtools.Annotations;
using Leadtools.Codecs;
using Leadtools.WinForms;

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

See Also

Reference

AnnPolyRulerObject Class
AnnPolyRulerObject Members

Error processing SSI file
(Deprecated, use Leadtools.Annotations.Core instead)