An attribute is either null (i.e. not defined---it hasn't been set yet), or symbolic (a name that has to be looked up using an IpeStyleSheet), or an absolute value.
A null value is used in higher levels of the hierarchy to defer the setting of the attribute to a lower level. For example, if the pen width is set in an IpeGroup object, all its members have this uniform pen width. To allow the members to have individual pen width, the IpeGroup must have a null pen width.
To make the representation more compact, Ipe objects store attribute values as an index into an IpeRepository. IpeAttribute encapsulates this index. Its meaning is as follows:
Furthermore, the attribute stores the type of attribute, such as scalar (a double value), color, dash style, etc.
Note the difference between the null color, which means that the color has not yet been defined (it is left to lower-level objects), and the "void" color, which means that the object should not be stroked or filled.
When rendering an object, a null color is interpreted as the void color. This allows leaf objects not to specify the void color.
Note that it is impossible for style sheets to redefine the meaning of "black" and "white". If a user needs a symbolic name that is black or white in some styles, she can always define another symbolic name, e.g. "Black" and "White".
Note also the difference between null and "solid" (the special dash style of a solid line). It is impossible for style sheets to redefine the meaning of "solid".
When rendering an object, a null dash style is interpreted as solid.
|
The different kinds of attributes.
|
|
Default constructor creates null object.
|
|
Is it symbolic?
|
|
In bool expressions, attribute is false iff it is null.
|
|
Is it null?
|
|
Is it absolute (including the special values |
|
Is it an (absolute) value (either numeric or in IpeRepository)?
|
|
Is it a numeric value?
|
|
Is it void?
|
|
Is it null or void (null is interpreted as void when drawing)?
|
|
Is it solid?
|
|
Is it null or solid (null is interpreted as solid when drawing)?
|
|
Is it black?
|
|
Is it white?
|
|
Return index into IpeRepository.
|
|
Return value of absolute numeric argument.
|
|
Return kind of attribute.
|
|
Are two values equal (only compares index!).
|
|
Are two values different (only compares index!).
|
|
Create void color.
|
|
Create solid dash style.
|
|
Create black color.
|
|
Create white color.
|