Prev Up Next
Object Types Concepts Properties

Structure of a Drawing

A drawing consists of primitives organized in compound objects. The entire drawing itself, the document, is a compound object that contains all the others.

When speaking about the objects contained in a compound object, it's convenient to use the terms parent and child. The compound object is the parent of the object it contains, the contained objects are the compound object's children.

The objects are always drawn in the same order with the objects drawn later obscuring the ones drawn earlier in case of overlap. One might also say that some objects lie on top of each other and that objects are drawn from bottom to top. This is the model we usually use and the reason for menu items such as "Move To Top".

The order in which the objects are drawn changes only when the user explicitly chooses a command that does so. Moving an object around or changing the fill properties does not change this order.

Layers

The top-level compound object, the document, is always divided into layers. Layers are the only kind of children a document can have and the parent of a layer will always be a document.

This means that normal objects such as primitives or other types of compound objects are never contained directly in the document object but are always, directly or indirectly, contained in a layer.

The layer is a special compound object with some special attributes. These attributes control whether its children are visible or not.


Object Types Concepts Properties
Prev Up Next