public sealed class AnnObject : IAnnObjectCloneable
function Leadtools.Annotations.Core.AnnObject()
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 |
---|---|
Each AnnObject contains an array of Leadtools.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. |
|
Object rotation center and gripper. |
|
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. |
|
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. |
Extra properties that are not used directly by the object but can be used to store a hyperlink and any 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. |
Text labels that can be used to draw text legends next to the object, such as a name. |
|
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, AnnObject contains other properties and methods that of interest only when creating new object types. For more information, refer to Implementing User-Defined Objects With LEADTOOLS Annotations.
For an example, refer to AnnContainer.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2