The 2D Graphics framework provides two distinct ways of rendering geometries on a device:
2D Modeling classes also provide a convenient way to associate geometry with attributes and transforms for rendering and storage.
IMGraphic is the abstract base class for representing the 2D primitives of the 2D Graphics framework. It is a higher-level manifestation of graphical objects which can be held in a collection, transformed, and rendered to a graphic device through an IGrafPort.
IMGraphic can be considered as a utility class for applications to hold geometry-related data that includes the geometry definition, its IGrafBundle (set of graphical attributes defining the representation of the geometry), and a set of transformation functions. You can derive from default IMGraphic objects and store other information specified.
Each IMGraphic object provides the following functionality:
Create your own IMDrawable and IMGraphic derived class to create complex graphics such as an automobile or human figure. A complex graphic is actually a combination of the geometry classes. The drawing port can render it because it knows all of the geometry classes.
![]()
2D Graphics Rendering Pipeline Overview