Ipelib
|
#include <ipeattributes.h>
Static Public Member Functions | |
static Attribute | Boolean (bool flag) |
static Attribute | BLACK () |
static Attribute | WHITE () |
static Attribute | ONE () |
static Attribute | NORMAL () |
static Attribute | UNDEFINED () |
static Attribute | BACKGROUND () |
static Attribute | SYM_STROKE () |
static Attribute | SYM_FILL () |
static Attribute | SYM_PEN () |
static Attribute | ARROW_NORMAL () |
static Attribute | OPAQUE () |
static Attribute | ARROW_ARC () |
static Attribute | ARROW_FARC () |
static Attribute | makeColor (String str, Attribute deflt) |
static Attribute | makeScalar (String str, Attribute deflt) |
static Attribute | makeDashStyle (String str) |
static Attribute | makeTextSize (String str) |
static Attribute | normal (Kind kind) |
Friends | |
class | StyleSheet |
An attribute of an Ipe Object.
An attribute is either an absolute value or a symbolic name that has to be looked up in a StyleSheet.
All string values are replaced by indices into a Repository (that applies both to symbolic names and to absolute values that are strings). All other values are stored directly inside the attribute, either as a Fixed or a Color.
There are five different kinds of Attribute objects:
|
inlineexplicit |
Default constructor.
|
explicit |
Create an attribute with string value.
|
explicit |
Create an absolute numeric attribute.
|
explicit |
Create an attribute with absolute color.
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlinestatic |
|
inline |
Is it symbolic?
|
inline |
Is it an absolute string value?
|
inline |
Is it a color?
|
inline |
Is it a number?
|
inline |
Is it an enumeration?
|
inline |
Is it a boolean?
|
inline |
Is it the symbolic name "normal"?
|
inline |
Return index into Repository.
|
inline |
String Attribute::string | ( | ) | const |
Return string representing the attribute.
Fixed Attribute::number | ( | ) | const |
Return value of absolute numeric attribute.
Color Attribute::color | ( | ) | const |
Return absolute color.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Are two values equal (only compares index!)
|
inline |
Are two values different (only compares index!)
|
inlinestatic |
Create absolute black color.
|
inlinestatic |
Create absolute white color.
|
inlinestatic |
Create absolute number one.
|
inlinestatic |
Create symbolic attribute "normal".
|
inlinestatic |
Create symbolic attribute "undefined".
|
inlinestatic |
Create symbolic attribute "Background".
|
inlinestatic |
Create symbolic attribute "sym-stroke".
|
inlinestatic |
Create symbolic attribute "sym-fill".
|
inlinestatic |
Create symbolic attribute "sym-pen".
|
inlinestatic |
Create symbolic attribute "arrow/normal(spx)".
|
inlinestatic |
Create symbolic attribute "opaque".
|
inlinestatic |
Create symbolic attribute "arrow/arc(spx)".
|
inlinestatic |
Create symbolic attribute "arrow/farc(spx)".
Make a color attribute.
If the string starts with a letter, make a symbolic attribute. Otherwise, it's either a single gray value (0.0 to 1.0), or the three red, green, and blue components, separated by spaces. If it's an empty string, return deflt.
Make a scalar attribute.
If str is empty, simply return deflt. If str starts with a letter, make a symbolic attribute. Otherwise, must be a number.
Construct dash style attribute from string.
Strings starting with '[' create an absolute dash style. The empty string is equivalent to 'normal'. Any other string creates a symbolic dash style.
Construct text size attribute from string.
String starting with digit creates a numeric absolute value, string starting with letter creates symbolic text size, anything else creates absolute (string) text size. The empty string is treated like "normal".
Return a standard value for attribute of kind.
The value is used if the stylesheet doesn't define a symbolic attribute used in the document.
|
friend |