Defines an annotation polyruler object.
public class AnnPolyRulerObject : Leadtools.Windows.Annotations.AnnPolylineObject, Leadtools.Windows.Annotations.IAnnFont, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPolyline, Leadtools.Windows.Annotations.IAnnRuler
Public Class AnnPolyRulerObject
Inherits Leadtools.Windows.Annotations.AnnPolylineObject
Implements Leadtools.Windows.Annotations.IAnnFont, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPolyline, Leadtools.Windows.Annotations.IAnnRuler
public ref class AnnPolyRulerObject : public Leadtools.Windows.Annotations.AnnPolylineObject, Leadtools.Windows.Annotations.IAnnFont, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPolyline, Leadtools.Windows.Annotations.IAnnRuler
The polyruler annotation object is an array of points that create a sequence of joined rulers. The polyruler can be used to measure the distance of an irregularly shaped object. As ruler segments are added, removed, or changed in length, a running total of the total distance is displayed. For more information, refer to Using Rulers in WPF Annotation Objects. For more information about the polyruler annotation object refer to AnnPolyrulerObject for WPF. For more information about the automated polyruler annotation object, refer to WPF Annotation Objects - Automated Features and WPF Automated Annotations - Ruler Tab.
This example creates a new polyruler.
Imports Leadtools.Windows.Controls
Imports Leadtools.Windows.Annotations
'''<!--This example creates a new polyruler.-->
Private Sub AnnPolyRulerObject_AnnPolyRulerObject(ByVal container As AnnContainer)
Dim polyruler As AnnPolyRulerObject = New AnnPolyRulerObject()
polyruler.MeasurementUnit = AnnUnit.SmartEnglish
polyruler.TickMarksLength = DirectCast(New LengthConverter().ConvertFrom("0.5in"), Double)
polyruler.ShowTickMarks = True
polyruler.GaugeLength = DirectCast(New LengthConverter().ConvertFrom("1.0in"), Double)
polyruler.ShowGauge = True
polyruler.ShowLength = True
polyruler.Precision = 2
polyruler.Points.Add(New System.Windows.Point(100, 100))
polyruler.Points.Add(New System.Windows.Point(200, 100))
polyruler.Points.Add(New System.Windows.Point(200, 200))
polyruler.Points.Add(New System.Windows.Point(100, 300))
polyruler.Stroke = Colors.Red
polyruler.StrokeThickness = 1.0
container.Children.Add(polyruler)
End Sub
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Demos;
using Leadtools.Help;
private void AnnPolyRulerObject_AnnPolyRulerObject(AnnContainer container)
{
AnnPolyRulerObject polyruler = new AnnPolyRulerObject();
polyruler.MeasurementUnit = AnnUnit.SmartEnglish;
polyruler.TickMarksLength = (double)new LengthConverter().ConvertFrom("0.5in");
polyruler.ShowTickMarks = true;
polyruler.GaugeLength = (double)new LengthConverter().ConvertFrom("1.0in");
polyruler.ShowGauge = true;
polyruler.ShowLength = true;
polyruler.Precision = 2;
polyruler.Points.Add(new Point(100, 100));
polyruler.Points.Add(new Point(200, 100));
polyruler.Points.Add(new Point(200, 200));
polyruler.Points.Add(new Point(100, 300));
polyruler.Stroke = Colors.Red;
polyruler.StrokeThickness = 1.0;
container.Children.Add(polyruler);
}
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Examples;
private void AnnPolyRulerObject_AnnPolyRulerObject(AnnContainer container)
{
AnnPolyRulerObject polyruler = new AnnPolyRulerObject();
polyruler.MeasurementUnit = AnnUnit.Pixel;
polyruler.TickMarksLength = 37;
polyruler.ShowTickMarks = true;
polyruler.GaugeLength = 75;
polyruler.ShowGauge = true;
polyruler.ShowLength = true;
polyruler.Precision = 2;
polyruler.Points.Add(new Point(100, 100));
polyruler.Points.Add(new Point(200, 100));
polyruler.Points.Add(new Point(200, 200));
polyruler.Points.Add(new Point(100, 300));
polyruler.Stroke = Colors.Red;
polyruler.StrokeThickness = 1.0;
container.Children.Add(polyruler);
}
Imports Leadtools.Windows.Controls
Imports Leadtools.Windows.Annotations
Private Sub AnnPolyRulerObject_AnnPolyRulerObject(ByVal container As AnnContainer)
Dim polyruler As AnnPolyRulerObject = New AnnPolyRulerObject()
polyruler.MeasurementUnit = AnnUnit.Pixel
polyruler.TickMarksLength = 37
polyruler.ShowTickMarks = True
polyruler.GaugeLength = 75
polyruler.ShowGauge = True
polyruler.ShowLength = True
polyruler.Precision = 2
polyruler.Points.Add(New Point(100, 100))
polyruler.Points.Add(New Point(200, 100))
polyruler.Points.Add(New Point(200, 200))
polyruler.Points.Add(New Point(100, 300))
polyruler.Stroke = Colors.Red
polyruler.StrokeThickness = 1.0
container.Children.Add(polyruler)
End Sub
Products |
Support |
Feedback: AnnPolyRulerObject Class - Leadtools.Windows.Annotations |
Introduction |
Help Version 19.0.2017.3.22
|
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.