Object Container Hierarchy

Escher has an object containership hierarchy similar to other drawing programs. At the root of the hierarchy is a drawing group object. There is one drawing group per client document. Drawing groups contain drawings. Drawings in turn contain shapes that are the objects that actually mark a page. Next to the drawings in a drawing group is a collection that contains the images and pictures used by the drawings. Escher keeps pictures in a separate collection to be able to incrementally load and save them.

Figure 1 -- Containership Hierarchy

A few other points are worth noting

  • Associated with each shape is a piece of client data that keeps the shape's anchor, text and OLE data, as well as host specific properties. The format of this structure is host-defined.
  • Shapes store their properties in a separate structure called a property table. The property table is basically a sorted list of property id-value pairs.
  • Each drawing group has a shape property table that stores the defaults for new shapes.
  • Each drawing has a collection of rules that govern the shapes in the drawing.
  • This object hierarchy does not exactly correspond to the record hierarchy in the file format. In the file format, drawings are not saved inside drawing groups, but in separate top-level containers. In this scheme, hosts can save drawing group information with per-document information, and save drawing information with per-sheet, per-slide, or per-page information.