AnnProtractorObject Class (original) (raw)
Summary
Defines an annotation protractor object.
Syntax
C#
Objective-C
C++/CLI
Java
Python
@interface LTAnnProtractorObject : LTAnnPolyRulerObject<NSCoding, NSCopying>
public class AnnProtractorObject extends AnnPolyRulerObject
class AnnProtractorObject(AnnPolyRulerObject):
Example
This example creates a protractor 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_AnnProtractorObject()
{
// assumes _automation is valid
double inch = 720.0;
// Add a protractor object
AnnProtractorObject protractorObj = new AnnProtractorObject();
// Set the points for the protractor
protractorObj.FirstPoint = LeadPointD.Create(5 * inch, 1 * inch);
protractorObj.CenterPoint = LeadPointD.Create(1 * inch, 3 * inch);
protractorObj.SecondPoint = LeadPointD.Create(5 * inch, 5 * inch);
// Set the radius
protractorObj.ArcRadius = LeadLengthD.Create(350);
// Add the object to the automation container
_automation.Container.Children.Add(protractorObj);
}