AnnPolyRulerObject Class (original) (raw)
Summary
Defines an annotation polyruler object.
Syntax
C#
Objective-C
C++/CLI
Java
Python
@interface LTAnnPolyRulerObject : LTAnnPolylineObject<NSCoding, NSCopying>
public class AnnPolyRulerObject extends AnnPolylineObject
class AnnPolyRulerObject(AnnPolylineObject):
Example
This example creates a polyruler object and adds it to the automation container.
using Leadtools.Annotations.Automation;
using Leadtools.Annotations.Engine;
using Leadtools.Codecs;
using Leadtools.Annotations;
using Leadtools.Annotations.WinForms;
public void AnnCore_AnnPolyRulerObject()
{
// assumes _automation is valid
double inch = 720.0;
// Add a freehand hotspot object
AnnPolyRulerObject polyRulerObj = new AnnPolyRulerObject();
// Set the points for the freehand hotspot
polyRulerObj.Points.Add(LeadPointD.Create(1 * inch, 1 * inch));
polyRulerObj.Points.Add(LeadPointD.Create(2 * inch, 2 * inch));
polyRulerObj.Points.Add(LeadPointD.Create(1 * inch, 5 * inch));
// Set the stroke
polyRulerObj.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Red"), LeadLengthD.Create(2));
// Add the object to the automation container
_automation.Container.Children.Add(polyRulerObj);
}