Graphics objects

The properties of graphics objects are accessed by functions (attributes).

In principle there are two methods of editing these attributes such as color or size.

  • You can use the functions setValue(), setMultiValue(), getValue() and getMultiValue(). You can also access shapes not only in the local panel but also in other modules or panels from the same UI manager.

  • The method with the "dot" operator has syntactic and didactic advantages and simplifies working with attributes. It is, however, unsuitable for reading more than one parameter.

With the dot notation, expressions can be chained at an arbitrary depth. The expression the chaining is used on can be any expression, even a constant

The parameters of graphics attributes and their data types or the format in which they must be passed are explained and defined in the following sections.

The general attributes of objects (this means attributes that can be used for several object types) like color and line type string are described in the first chapters (Attributes of all graphics objects (overview) and in the chapters under "Functions for all graphics objects (detailed)". The object specific attributes are described further on.

Hierarchy of graphics objects

The figure below illustrates the object hierarchy. This tree diagram shows what objects are derived from what objects higher up the tree and thus indicates where their attributes are inherited from.

"Bordered" contains all graphics objects having line type as an attribute. Thus "Bordered" attributes also apply to "Fillable" and hence to "Ellipse", "Arc", "Polygon", "Primitive Text", "Rectangle" as well as "Line".

Figure 1. Hierarchy of graphics objects