AnnEllipseObject Class (original) (raw)
Summary
Defines an annotation ellipse object.
Syntax
C#
Objective-C
C++/CLI
Java
Python
@interface LTAnnEllipseObject : LTAnnRectangleObject<NSCoding, NSCopying>
public class AnnEllipseObject extends AnnRectangleObject
class AnnEllipseObject(AnnRectangleObject):
Example
This example creates an ellipse 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_AnnEllipseObject()
{
// assumes _automation is valid
double inch = 720.0;
// Add a filled ellipse object
AnnEllipseObject ellipseObj = new AnnEllipseObject();
// Set the points for the ellipse
ellipseObj.Points.Add(LeadPointD.Create(1 * inch, 1 * inch));
ellipseObj.Points.Add(LeadPointD.Create(2 * inch, 1 * inch));
ellipseObj.Points.Add(LeadPointD.Create(2 * inch, 2 * inch));
ellipseObj.Points.Add(LeadPointD.Create(1 * inch, 2 * inch));
// Set the stroke
ellipseObj.Stroke = AnnStroke.Create(AnnSolidColorBrush.Create("Red"), LeadLengthD.Create(3));
// Set the fill
ellipseObj.Fill = AnnSolidColorBrush.Create("Green");
// Add the object to the automation container
_automation.Container.Children.Add(ellipseObj);
}