This class provides support for creating and managing Ruler annotation objects.
public class AnnRulerObject : IAnnRuler, IAnnFont, AnnLineObject The annotation ruler object is characterized by starting and ending points, a stroke, a length, tick marks, and a gauge. For more information, refer to Using Rulers in WPF Annotation Objects. For more information about the ruler annotation object refer to AnnRulerObject for WPF. For more information about the automated ruler annotation object, refer to WPF Annotation Objects - Automated Features and WPF Automated Annotations - Ruler Tab.
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.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;private void AnnRulerObject_AnnRulerObject(AnnContainer container){AnnRulerObject ruler = new AnnRulerObject();ruler.Start = new Point((double)new LengthConverter().ConvertFrom("10in"), (double)new LengthConverter().ConvertFrom("4.5in"));ruler.End = new Point((double)new LengthConverter().ConvertFrom("20.56in"), (double)new LengthConverter().ConvertFrom("40.3in"));ruler.Stroke = Colors.Red;ruler.MeasurementUnit = AnnUnit.SmartEnglish;ruler.TickMarksLength = (double)new LengthConverter().ConvertFrom("0.5in");ruler.ShowTickMarks = true;ruler.GaugeLength = (double)new LengthConverter().ConvertFrom("1.0in");ruler.ShowGauge = true;ruler.ShowLength = true;ruler.Precision = 2;ruler.StrokeThickness = 4.0;container.Children.Add(ruler);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.Annotations'''<!--This method creates a new ruler object that extends from 10.0, 4.5 to 20.56, 40.3 and is measured in inches.-->Private Sub AnnRulerObject_AnnRulerObject(ByVal container As AnnContainer)Dim ruler As AnnRulerObject = New AnnRulerObject()ruler.Start = New Point(DirectCast(New LengthConverter().ConvertFrom("10in"), Double),DirectCast(New LengthConverter().ConvertFrom("4.5in"), Double))ruler.End = New Point(DirectCast(New LengthConverter().ConvertFrom("20.56in"), Double),DirectCast(New LengthConverter().ConvertFrom("40.3in"), Double))ruler.MeasurementUnit = AnnUnit.SmartEnglishruler.TickMarksLength = DirectCast(New LengthConverter().ConvertFrom("0.5in"), Double)ruler.ShowTickMarks = Trueruler.GaugeLength = DirectCast(New LengthConverter().ConvertFrom("1.0in"), Double)ruler.ShowGauge = Trueruler.ShowLength = Trueruler.Precision = 2ruler.Stroke = Colors.Redruler.StrokeThickness = 4.0container.Children.Add(ruler)End Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;//using Leadtools.Help;private void AnnRulerObject_AnnRulerObject(AnnContainer container){AnnRulerObject ruler = new AnnRulerObject();ruler.Start = new Point(750, 337);ruler.End = new Point(1542, 3022);ruler.Stroke = Colors.Red;ruler.MeasurementUnit = AnnUnit.Pixel;ruler.TickMarksLength = 37;ruler.ShowTickMarks = true;ruler.GaugeLength = 75;ruler.ShowGauge = true;ruler.ShowLength = true;ruler.Precision = 2;ruler.StrokeThickness = 4.0;container.Children.Add(ruler);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnRulerObject_AnnRulerObject(ByVal container As AnnContainer)Dim ruler As AnnRulerObject = New AnnRulerObject()ruler.Start = New Point(750, 337)ruler.End = New Point(1542, 3022)ruler.Stroke = Colors.Redruler.MeasurementUnit = AnnUnit.Pixelruler.TickMarksLength = 37ruler.ShowTickMarks = Trueruler.GaugeLength = 75ruler.ShowGauge = Trueruler.ShowLength = Trueruler.Precision = 2ruler.StrokeThickness = 4.0container.Children.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
