Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
AnnRulerObject Class
See Also  Members   Example 
Leadtools.Annotations Namespace : AnnRulerObject Class




This class provides support for creating and managing Ruler annotation objects.

Object Model

















Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class AnnRulerObject 
   Inherits AnnLineObject
   Implements IAnnRulerObject 
Visual Basic (Usage)Copy Code
Dim instance As AnnRulerObject
C# 
[SerializableAttribute()]
public class AnnRulerObject : AnnLineObject, IAnnRulerObject  
Managed Extensions for C++ 
[SerializableAttribute()]
public __gc class AnnRulerObject : public AnnLineObject, IAnnRulerObject  
C++/CLI 
[SerializableAttribute()]
public ref class AnnRulerObject : public AnnLineObject, IAnnRulerObject  

Example

This method creates a new ruler object that extends from 10.0, 4.5 to 20.56, 40.3 and is measured in inches.

Visual BasicCopy Code
Private 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.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)
End Sub
C#Copy Code
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); 
}

Remarks

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.

For more information about the ruler annotation object refer to AnnRulerObject. For more information about the automated ruler annotation object, refer to Annotation Objects - Automated Features and Automated Annotations - Ruler Tab.

Inheritance Hierarchy

System.Object
   Leadtools.Annotations.AnnDrawable
      Leadtools.Annotations.AnnObject
         Leadtools.Annotations.AnnLineObject
            Leadtools.Annotations.AnnRulerObject

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features