←Select platform

AnnObject Class

Summary

Defines the base class for all annotation objects.

Syntax

C#
VB
Java
Objective-C
WinRT C#
C++
public abstract class AnnObject : IAnnObjectCloneable 
Public MustInherit Class AnnObject  
   Implements Leadtools.Annotations.Core.IAnnObjectCloneable  
public sealed class AnnObject : Leadtools.Annotations.Core.IAnnObjectCloneable   
@interface LTAnnObject : NSObject<NSCoding,NSCopying> 
public abstract class AnnObject implements IAnnObjectCloneable 
function Leadtools.Annotations.Core.AnnObject() 
public: 
   ref class AnnObject abstract : IAnnObjectCloneable 

Remarks

The AnnObject class provides all the basic functionality common to all LEADTOOLS annotation objects. AnnObject is an abstract class: you cannot instantiate objects of this class directly. Instead, you create an instance of a derived class such as AnnPolylineObject or AnnRectangleObject and use the methods and properties of the base AnnObject through the derived class.

AnnObject contains the following members:

Member Description

Points

Each AnnObject contains an array of Leadtools.LeadPointD points in container coordinates that define its location and size. How these points are interpreted to form the object shape is up to the derived class. For instance, a line object normally has two points: a starting point and an ending point. A rectangle object has four points, one for each corner (to keep track of rotated objects) and so forth.

RotateCenter and RotateGripper

Object rotation center and gripper.

Stroke, Fill and Font

The objects to use when drawing the boundary, filling the interior of an annotation object and drawing any text strings. A line object uses only the stroke object whereas a rectangle object uses both stroke and fill objects. A text object use all three to render its string.

Scale, ScaleVector, Translate and Rotate

Helper method that transforms the object instead of directly manipulating the raw points.

IsVisible and IsSelected

Hides/shows and selects/unselects an object in the container.

Hyperlink, Tag and Metadata

Extra properties that are not used directly by the object, but can be used to store a hyperlink or any user-defined data.

Password, Lock, Unlock, IsLocked and LockPicture

Properties and methods for locking an object with a password. A locked object cannot be moved nor deleted by the automation framework and can be rendered with a special "lock" picture next to it.

Opacity

Opacity value to use when rendering the object.

Labels

Text labels that can be used to draw text legends next to an object, such as a name.

Reviews
Review items that can be used to add review comments and replies to this AnnObject.

HitTest

Helper method to determine whether a point intersects with this object.

Serialize and Deserialize

Saves and loads objects from an XML element. Used to load and save an object to an annotation file, as well as to perform undo/redo operations.

AnnObjects are added to a container using the AnnContainer.Children property. Objects can optionally be added to layers inside the container. For more information, refer to AnnLayer.

Example

For an example, refer to AnnContainer.

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Core Assembly