### Modeling Examples

This section provides examples of IMGraphic subclasses and conglomerate groups of graphics.

### IMGraphic Basic Components

The figure shows the basic components of IMGraphic:

### IMGraphic and Corresponding Geometries

If your application needs to hold geometry-related data along with its graphical representation, use IMGraphic and its subclasses. You can also implement your own retained mode implementations similar to IMGraphic or extend IMGraphic for their particular application.

The figure shows various IMGraphics and their corresponding geometries.

The 2D Graphics framework supports other concrete IMGraphic subclasses:

- IGraphicGroup
- IImage
- IArea

### User-defined IMGraphic Subclasses

The figure shows simple and complex user-defined subclasses of IMGraphic.

### Complex IMGraphic

A complex 2D graphic consists of a number of interrelated shapes. A wagon has a body, four wheels, and a handle. When the wagon moves, the wheels rotate. A 2D graphic group lets you create a complex 2D graphic such as a wagon that you can hit test, transform, and draw as a hierarchical unit.

In the wagon shown in the figure, the body consists of four panels and rests on four wheels. When the wagon moves, the wheels move too, but also rotate.

Graphics Class Architecture

IMGraphic Models

IGraphicGroup Attribute and Transformation Hierarchy