AnnObject Object

Summary

Defines the base class for all annotation objects.

Syntax
TypeScript
JavaScript
function lt.Annotations.Engine.AnnObject 
	implements IAnnObjectCloneable 
class lt.Annotations.Engine.AnnObject() 
	implements 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 LeadPointD in container coordinates that define its location and size. How these points are interpreted in forming the object shape is up to the derived class. For instance a line object would normally have two points: start and end. A rectangle object will have four points for the 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 would use only the stroke while, a rectangle object would use both while a text object would use both and the font for rendering its string.
Scale, Translate and Rotate Helper method to transform the object instead of manipulating the raw points directly.
IsVisible and IsSelected Hide/show and select/unselect 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 user-defined data.
Password, Lock, Unlock, IsLocked and LockPicture Properties and methods to use 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 the object, such as a name.

HitTest

Helper method to check if a point intersects with this object.
Serialize and Deserialize Save and load the objects from an XML element. Used to load and save the object to an annotation file as well as undo/redo operations.

As well as the members described above, an AnnObject contains other properties and methods that are of interest only when creating new object types. For more information, refer to Implementing User-Defined Objects With LEADTOOLS Annotations.

Add AnnObjects 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 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Engine Assembly