Leadtools.Annotations Namespace : AnnPolyRulerObject Class |
[SerializableAttribute()] public class AnnPolyRulerObject : AnnPolylineObject, IAnnRulerObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
'Declaration <SerializableAttribute()> Public Class AnnPolyRulerObject Inherits AnnPolylineObject Implements IAnnRulerObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
'Usage Dim instance As AnnPolyRulerObject
public sealed class AnnPolyRulerObject : IAnnRulerObject, System.ICloneable, IClosable //In WinRT the IDisposable interface is replaced by IClosable, ~Remove~
function Leadtools.Annotations.AnnPolyRulerObject()
[SerializableAttribute()] public ref class AnnPolyRulerObject : public AnnPolylineObject, IAnnRulerObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
For more information about the polyruler annotation object refer to AnnPolyrulerObject. For more information about the automated polyruler annotation object, refer to Annotation Objects - Automated Features and Automated Annotations - Ruler Tab.
To get the total length of a poly ruler object, use the GetPolyRulerLength helper method.
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
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); }
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