Helper method to get the total length of a poly ruler.
public static AnnLength GetPolyRulerLength(
RasterCollection<AnnPoint> points,
AnnUnit measurementUnit,
AnnUnitConverter converter
)
Public Shared Function GetPolyRulerLength( _
ByVal points As Leadtools.RasterCollection(Of AnnPoint), _
ByVal measurementUnit As Leadtools.Annotations.AnnUnit, _
ByVal converter As Leadtools.Annotations.AnnUnitConverter _
) As Leadtools.Annotations.AnnLength
public:
static Leadtools.Annotations.AnnLength GetPolyRulerLength(
Leadtools.RasterCollection<AnnPoint>^ points,
Leadtools.Annotations.AnnUnit measurementUnit,
Leadtools.Annotations.AnnUnitConverter^ converter
)
points
Poly ruler points.
measurementUnit
The desired measurement unit.
converter
Unit converter to use.
An AnnLength object that contains the total length of the poly ruler in the desired measurement units.
GetPolyRulerLength is a helper method that can be used to obtain the total length of a poly ruler object.
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());
}
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
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET