This class provides support for creating and managing Ruler annotation objects.
[SerializableAttribute()]public class AnnRulerObject : IAnnRulerObject, AnnLineObject
<SerializableAttribute()>Public Class AnnRulerObjectInherits Leadtools.Annotations.AnnLineObjectImplements Leadtools.Annotations.IAnnRulerObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
[SerializableAttribute()]public ref class AnnRulerObject : public Leadtools.Annotations.AnnLineObject, Leadtools.Annotations.IAnnRulerObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
The annotation ruler object is characterized by starting and ending points, a bounding rectangle, a pen, a length, tick marks, and a gauge. The pen is inherited from the AnnDrawable class. For more information, refer to Using Rulers in Annotation Objects. (Deprecated) For more information about the ruler annotation object refer to AnnRulerObject (Deprecated). For more information about the automated ruler annotation object, refer to Annotation Objects - Automated Features (Deprecated) and Automated Annotations - Ruler Tab (Deprecated).
This method creates a new ruler object that extends from 10.0, 4.5 to 20.56, 40.3 and is measured in inches.
using Leadtools;using Leadtools.Annotations;using Leadtools.Codecs;using Leadtools.WinForms;private void AnnRulerObject_AnnRulerObject(AnnContainer container){AnnRulerObject ruler = new AnnRulerObject();ruler.StartPoint = new AnnPoint(10.0F, 4.5F, AnnUnit.Inch);ruler.EndPoint = new AnnPoint(20.56F, 40.3F, AnnUnit.Inch);ruler.MeasurementUnit = AnnUnit.SmartEnglish;ruler.TickMarksLength = new AnnLength(0.5F, AnnUnit.Inch);ruler.ShowTickMarks = true;ruler.GaugeLength = new AnnLength(1.0F, AnnUnit.Inch);ruler.ShowGauge = true;ruler.ShowLength = true;ruler.Precision = 2;ruler.Pen = new AnnPen(Color.Red, new AnnLength(4));container.Objects.Add(ruler);}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.CodecsImports Leadtools.WinFormsPrivate Sub AnnRulerObject_AnnRulerObject(ByVal container As AnnContainer)Dim ruler As AnnRulerObject = New AnnRulerObject()ruler.StartPoint = New AnnPoint(10.0F, 4.5F, AnnUnit.Inch)ruler.EndPoint = New AnnPoint(20.56F, 40.3F, AnnUnit.Inch)ruler.MeasurementUnit = AnnUnit.SmartEnglishruler.TickMarksLength = New AnnLength(0.5F, AnnUnit.Inch)ruler.ShowTickMarks = Trueruler.GaugeLength = New AnnLength(1.0F, AnnUnit.Inch)ruler.ShowGauge = Trueruler.ShowLength = Trueruler.Precision = 2ruler.Pen = New AnnPen(Color.Red, New AnnLength(4))container.Objects.Add(ruler)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
