This section describes how to derive a custom class from OdDbEntity class, and includes specific examples of overriding virtual methods provided by the OdDbEntity class. Overriding common entity operations, such as object snap points, grip points, and stretch points, is also discussed in this section.
OdDbEntity is the base class for all database objects that have a graphical representation. The OdDbEntity class is derived from the OdDbObject class. Creating a custom entity involves the following steps:
Deriving a Custom Entity Class
Implementing Drawing Functions
Implementing Save and Load Functions
Implementing Undo and Redo Operations
Implementing Transformation Functions
Implementing Grip Point Functions
Implementing Snap Point Functions
Implementing Exploding Functions
To learn about the Smiley example code, see Smiley Object Example.
Copyright © 2002 – 2020. Open Design Alliance. All rights reserved.
|