LEADTOOLS Annotations (Leadtools.Annotations assembly)
LEAD Technologies, Inc

AnnRulerObject Class

Example 





Members 
This class provides support for creating and managing Ruler annotation objects.
Object Model
AnnRulerObject ClassAnnRectangle StructureAnnBrush ClassAnnContainer ClassAnnPoint StructureAnnFont ClassAnnLength StructureAnnGroupObject ClassAnnFont ClassAnnPoint StructureAnnPoint StructureAnnPen ClassAnnPoint StructureAnnPoint StructureAnnPoint StructureAnnLength StructureAnnUnitConverter Class
Syntax
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.

Example
 
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
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);
}
Requirements

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

See Also

Reference

AnnRulerObject Members
Leadtools.Annotations Namespace

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.