Ipelib
|
A style sheet maps symbolic names to absolute values. More...
#include <ipestyle.h>
A style sheet maps symbolic names to absolute values.
Ipe documents can use symbolic attributes, such as 'normal', 'fat', or 'thin' for line thickness, or 'red', 'navy', 'turquoise' for color. The mapping to an absolute pen thickness or RGB value is performed by a StyleSheet.
Style sheets are always included when the document is saved, so that an Ipe document is self-contained.
The built-in standard style sheet is minimal, and only needed to provide sane fallbacks for all the "normal" settings.
StyleSheet::StyleSheet | ( | ) |
The default constructor creates an empty style sheet.
StyleSheet * StyleSheet::standard | ( | ) | [static] |
Create standard built-in style sheet.
Find a symbol object with given name.
If attr is not symbolic or if the symbol doesn't exist, returns 0.
Add gradient to this style sheet.
Find gradient in style sheet cascade.
Add an attribute.
Does nothing if name is not symbolic.
Check whether symbolic attribute is defined.
This method also works for ESymbol, EGradient, ETiling, and EEffect.
Returns true if sym is not symbolic.
Find a symbolic attribute.
If sym is not symbolic, returns sym itself. If sym cannot be found, returns the "undefined" attribute. In all other cases, the returned attribute is guaranteed to be absolute.
void StyleSheet::saveAsXml | ( | Stream & | stream, |
bool | saveBitmaps = false |
||
) | const |
Save style sheet in XML format.
void StyleSheet::allNames | ( | Kind | kind, |
AttributeSeq & | seq | ||
) | const |
Return all symbolic names in the style sheet cascade.
Names are simply appended from top to bottom of the cascade. Names are inserted only once.
bool ipe::StyleSheet::isStandard | ( | ) | const [inline] |
Return whether this is the standard style sheet built into Ipe.
void ipe::StyleSheet::setPreamble | ( | const String & | str | ) | [inline] |
Set LaTeX preamble.
const Layout * StyleSheet::layout | ( | ) | const |
Return page layout (or 0 if none defined).
void StyleSheet::setLayout | ( | const Layout & | margins | ) |
Set page layout.
const TextPadding * StyleSheet::textPadding | ( | ) | const |
Return text object padding (for bbox computation).
void StyleSheet::setTextPadding | ( | const TextPadding & | pad | ) |
Set padding for text object bbox computation.
const StyleSheet::TitleStyle * StyleSheet::titleStyle | ( | ) | const |
Return title style (or 0 if none defined).
void StyleSheet::setTitleStyle | ( | const TitleStyle & | ts | ) |
Set style of page titles.
const StyleSheet::PageNumberStyle * StyleSheet::pageNumberStyle | ( | ) |
Return page number style.
void StyleSheet::setPageNumberStyle | ( | const PageNumberStyle & | pns | ) |
Set style of page numbering.
void StyleSheet::addCMap | ( | String | s | ) |
Add font s to list of fonts with cmap generation.
void StyleSheet::allCMaps | ( | std::vector< String > & | seq | ) | const |
void StyleSheet::setLineCap | ( | TLineCap | s | ) |
Set line cap.
void StyleSheet::setLineJoin | ( | TLineJoin | s | ) |
Set line join.
void StyleSheet::setFillRule | ( | TFillRule | s | ) |
Set fill rule.
TLineCap ipe::StyleSheet::lineCap | ( | ) | const [inline] |
Return line cap.
TLineJoin ipe::StyleSheet::lineJoin | ( | ) | const [inline] |
Return line join.
TFillRule ipe::StyleSheet::fillRule | ( | ) | const [inline] |
Return path fill rule.
String ipe::StyleSheet::name | ( | ) | const [inline] |
Return name of style sheet.
void ipe::StyleSheet::setName | ( | const String & | name | ) | [inline] |
Set name of style sheet.