Defines an annotation polyruler object.
[SerializableAttribute()]
public class AnnPolyRulerObject : Leadtools.Annotations.AnnPolylineObject, Leadtools.Annotations.IAnnRulerObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
<SerializableAttribute()>
Public Class AnnPolyRulerObject
Inherits Leadtools.Annotations.AnnPolylineObject
Implements Leadtools.Annotations.IAnnRulerObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
[SerializableAttribute()]
public ref class AnnPolyRulerObject : public Leadtools.Annotations.AnnPolylineObject, Leadtools.Annotations.IAnnRulerObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
The polyruler annotation object is an array of points that create a sequence of joined rulers. The polyruler can be used to measure the distance of an irregularly shaped object. As ruler segments are added, removed, or changed in length, a running total of the total distance is displayed. For more information, refer to Using Rulers in Annotation Objects. (Deprecated) For more information about the polyruler annotation object refer to AnnPolyrulerObject (Deprecated). For more information about the automated polyruler annotation object, refer to Annotation Objects - Automated Features (Deprecated) and Automated Annotations - Ruler Tab (Deprecated).
To get the total length of a poly ruler object, use the GetPolyRulerLength helper method.
This example creates a new polyruler.
using Leadtools;
using Leadtools.Annotations;
using Leadtools.Codecs;
using Leadtools.WinForms;
private void AnnPolyRulerObject_AnnPolyRulerObject(AnnContainer container)
{
AnnPolyRulerObject polyruler = new AnnPolyRulerObject();
polyruler.MeasurementUnit = AnnUnit.SmartEnglish;
polyruler.TickMarksLength = new AnnLength(0.5F, AnnUnit.Inch);
polyruler.ShowTickMarks = true;
polyruler.GaugeLength = new AnnLength(1.0F, AnnUnit.Inch);
polyruler.ShowGauge = true;
polyruler.ShowLength = true;
polyruler.Precision = 2;
polyruler.Points.Add(new AnnPoint(100, 100, AnnUnit.Pixel));
polyruler.Points.Add(new AnnPoint(200, 100, AnnUnit.Pixel));
polyruler.Points.Add(new AnnPoint(200, 200, AnnUnit.Pixel));
polyruler.Points.Add(new AnnPoint(100, 300, AnnUnit.Pixel));
polyruler.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel));
container.Objects.Add(polyruler);
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.Codecs
Imports Leadtools.WinForms
Private Sub AnnPolyRulerObject_AnnPolyRulerObject(ByVal container As AnnContainer)
Dim polyruler As AnnPolyRulerObject = New AnnPolyRulerObject()
polyruler.MeasurementUnit = AnnUnit.SmartEnglish
polyruler.TickMarksLength = New AnnLength(0.5F, AnnUnit.Inch)
polyruler.ShowTickMarks = True
polyruler.GaugeLength = New AnnLength(1.0F, AnnUnit.Inch)
polyruler.ShowGauge = True
polyruler.ShowLength = True
polyruler.Precision = 2
polyruler.Points.Add(New AnnPoint(100, 100, AnnUnit.Pixel))
polyruler.Points.Add(New AnnPoint(200, 100, AnnUnit.Pixel))
polyruler.Points.Add(New AnnPoint(200, 200, AnnUnit.Pixel))
polyruler.Points.Add(New AnnPoint(100, 300, AnnUnit.Pixel))
polyruler.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))
container.Objects.Add(polyruler)
End Sub
Products |
Support |
Feedback: AnnPolyRulerObject Class - Leadtools.Annotations |
Introduction |
Help Version 19.0.2017.6.20
|
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.