Defines an annotation protractor object.
public class AnnProtractorObject : IAnnRuler, IAnnProtractor, IAnnFont, AnnObject Public Class AnnProtractorObjectInherits Leadtools.Windows.Annotations.AnnObjectImplements Leadtools.Windows.Annotations.IAnnFont, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnProtractor, Leadtools.Windows.Annotations.IAnnRuler
The protractor annotation object consists of two rulers joined at a point to create an angle. The center point is CenterPoint, the first line ends at FirstPoint and the second point ends at SecondPoint. For more information, refer to Using Protractors in WPF Annotation Objects. For more information about the protractor annotation object refer to AnnProtractorObject for WPF. For more information about the automated protractor clip annotation object, refer to WPF Annotation Objects - Automated Features and WPF Automated Annotations - Protractor Tab.
This example creates a new protractor object.
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Demos;using Leadtools.Help;private void AnnProtractorObject_AnnProtractorObject(AnnContainer container){AnnProtractorObject protractor = new AnnProtractorObject();protractor.Stroke = Colors.Green;protractor.StrokeThickness = 3.0;protractor.CenterPoint = new Point((double)new LengthConverter().ConvertFrom("10.0in"),(double)new LengthConverter().ConvertFrom("4.5in"));protractor.FirstPoint = new Point((double)new LengthConverter().ConvertFrom("5.0in"),(double)new LengthConverter().ConvertFrom("20.0in"));protractor.SecondPoint = new Point((double)new LengthConverter().ConvertFrom("20.56in"),(double)new LengthConverter().ConvertFrom("40.3in"));protractor.MeasurementUnit = AnnUnit.SmartEnglish;protractor.TickMarksLength = (double)new LengthConverter().ConvertFrom("0.5in");protractor.ShowTickMarks = true;protractor.GaugeLength = (double)new LengthConverter().ConvertFrom("1.0in");protractor.ShowGauge = true;protractor.ShowLength = true;protractor.Precision = 2;protractor.AngularUnit = AnnAngularUnit.Degree;protractor.Acute = true;protractor.AnglePrecision = 2;protractor.ArcRadius = (double)new LengthConverter().ConvertFrom("0.5in");container.Children.Add(protractor);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.Annotations'''<!--This example creates a new protractor object.-->Private Sub AnnProtractorObject_AnnProtractorObject(ByVal container As AnnContainer)Dim protractor As AnnProtractorObject = New AnnProtractorObject()protractor.Stroke = Colors.Greenprotractor.StrokeThickness = 3.0protractor.CenterPoint = New System.Windows.Point(DirectCast(New LengthConverter().ConvertFrom("10.0in"), Double),DirectCast(New LengthConverter().ConvertFrom("4.5in"), Double))protractor.FirstPoint = New System.Windows.Point(DirectCast(New LengthConverter().ConvertFrom("5.0in"), Double),DirectCast(New LengthConverter().ConvertFrom("20.0in"), Double))protractor.SecondPoint = New System.Windows.Point(DirectCast(New LengthConverter().ConvertFrom("20.56in"), Double),DirectCast(New LengthConverter().ConvertFrom("40.3in"), Double))protractor.MeasurementUnit = AnnUnit.SmartEnglishprotractor.TickMarksLength = DirectCast(New LengthConverter().ConvertFrom("0.5in"), Double)protractor.ShowTickMarks = Trueprotractor.GaugeLength = DirectCast(New LengthConverter().ConvertFrom("1.0in"), Double)protractor.ShowGauge = Trueprotractor.ShowLength = Trueprotractor.Precision = 2protractor.AngularUnit = AnnAngularUnit.Degreeprotractor.Acute = Trueprotractor.AnglePrecision = 2protractor.ArcRadius = DirectCast(New LengthConverter().ConvertFrom("0.5in"), Double)container.Children.Add(protractor)End Sub
using Leadtools.Windows.Controls;using Leadtools.Windows.Annotations;using Leadtools.Examples;//using Leadtools.Help;private void AnnProtractorObject_AnnProtractorObject(AnnContainer container){AnnProtractorObject protractor = new AnnProtractorObject();protractor.Stroke = Colors.Green;protractor.StrokeThickness = 3.0;protractor.CenterPoint = new Point(750, 337);protractor.FirstPoint = new Point(375, 1500);protractor.SecondPoint = new Point(1542, 3022);protractor.MeasurementUnit = AnnUnit.Pixel;protractor.TickMarksLength = 37;protractor.ShowTickMarks = true;protractor.GaugeLength = 75;protractor.ShowGauge = true;protractor.ShowLength = true;protractor.Precision = 2;protractor.AngularUnit = AnnAngularUnit.Degree;protractor.Acute = true;protractor.AnglePrecision = 2;protractor.ArcRadius = 37;container.Children.Add(protractor);}
Imports Leadtools.Windows.ControlsImports Leadtools.Windows.AnnotationsPrivate Sub AnnProtractorObject_AnnProtractorObject(ByVal container As AnnContainer)Dim protractor As AnnProtractorObject = New AnnProtractorObject()protractor.Stroke = Colors.Greenprotractor.StrokeThickness = 3.0protractor.CenterPoint = New Point(750, 337)protractor.FirstPoint = New Point(375, 1500)protractor.SecondPoint = New Point(1542, 3022)protractor.MeasurementUnit = AnnUnit.Pixelprotractor.TickMarksLength = 37protractor.ShowTickMarks = Trueprotractor.GaugeLength = 75protractor.ShowGauge = Trueprotractor.ShowLength = Trueprotractor.Precision = 2protractor.AngularUnit = AnnAngularUnit.Degreeprotractor.Acute = Trueprotractor.AnglePrecision = 2protractor.ArcRadius = 37container.Children.Add(protractor)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
