Inkscape
Vector Graphics Editor
|
SPStyle - a style object for SPItem objects. More...
Go to the source code of this file.
Classes | |
class | SPStyle |
An SVG style object. More... | |
Namespaces | |
namespace | Inkscape |
Helper class to stream background task notifications as a series of messages. | |
namespace | Inkscape::XML |
@Inkscape XML tree. | |
Typedefs | |
typedef SPIBase SPStyle::* | SPIBasePtr |
Functions | |
void | sp_style_set_to_uri (SPStyle *style, bool isfill, Inkscape::URI const *uri) |
char const * | sp_style_get_css_unit_string (int unit) |
double | sp_style_css_size_px_to_units (double size, int unit, double font_size=SP_CSS_FONT_SIZE_DEFAULT) |
double | sp_style_css_size_units_to_px (double size, int unit, double font_size=SP_CSS_FONT_SIZE_DEFAULT) |
SPCSSAttr * | sp_css_attr_from_style (SPStyle const *const style, unsigned int flags) |
SPCSSAttr * | sp_css_attr_from_object (SPObject *object, unsigned int flags=SP_STYLE_FLAG_IFSET) |
SPCSSAttr * | sp_css_attr_unset_text (SPCSSAttr *css) |
Unset any text-related properties. | |
SPCSSAttr * | sp_css_attr_unset_blacklist (SPCSSAttr *css) |
Unset properties that should not be set for default tool style. | |
SPCSSAttr * | sp_css_attr_unset_uris (SPCSSAttr *css) |
Unset any properties that contain URI values. | |
SPCSSAttr * | sp_css_attr_scale (SPCSSAttr *css, double ex) |
Scale any properties that may hold <length> by ex. | |
void | sp_style_unset_property_attrs (SPObject *o) |
void | sp_style_set_property_url (SPObject *item, char const *property, SPObject *linked, bool recursive) |
void | css_quote (Glib::ustring &val) |
Quote and/or escape string for writing to CSS, changing strings in place. | |
void | css_unquote (Glib::ustring &val) |
Remove paired single and double quotes from a string, changing string in place. | |
void | css_font_family_quote (Glib::ustring &val) |
Quote font names in font-family lists, changing string in place. | |
void | css_font_family_unquote (Glib::ustring &val) |
Remove paired single and double quotes from font names in font-family lists, changing string in place. | |
Glib::ustring | css2_escape_quote (char const *val) |
typedef SPIBase SPStyle::* SPIBasePtr |
Glib::ustring css2_escape_quote | ( | char const * | val | ) |
void css_font_family_quote | ( | Glib::ustring & | val | ) |
Quote font names in font-family lists, changing string in place.
We use unquoted names internally but some need to be quoted in CSS.
Definition at line 1687 of file style.cpp.
References css_quote().
Referenced by Inkscape::FontLister::fill_css(), and SPIString::get_value().
void css_font_family_unquote | ( | Glib::ustring & | val | ) |
Remove paired single and double quotes from font names in font-family lists, changing string in place.
We use unquoted family names internally but CSS sometimes uses quoted names.
Definition at line 1724 of file style.cpp.
References css_unquote().
Referenced by Inkscape::UI::Toolbar::TextToolbar::fontfamily_value_changed(), and SPIString::read().
void css_quote | ( | Glib::ustring & | val | ) |
Quote and/or escape string for writing to CSS, changing strings in place.
See: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
Definition at line 1648 of file style.cpp.
Referenced by css_font_family_quote(), Inkscape::FontLister::fill_css(), and SPIString::get_value().
void css_unquote | ( | Glib::ustring & | val | ) |
Remove paired single and double quotes from a string, changing string in place.
Definition at line 1706 of file style.cpp.
Referenced by css_font_family_unquote(), and SPIString::read().
SPCSSAttr * sp_css_attr_from_object | ( | SPObject * | object, |
unsigned int | flags = SP_STYLE_FLAG_IFSET |
||
) |
Scale any properties that may hold <length> by ex.
Definition at line 1627 of file style.cpp.
References css, sp_css_attr_scale_property_list(), and sp_css_attr_scale_property_single().
Referenced by Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::LivePathEffect::lpe_shape_revert_stroke_and_fill(), sp_desktop_apply_css_recursive(), sp_te_apply_style(), take_style_from_item(), and Inkscape::UI::Toolbar::TextToolbar::text_outer_set_style().
Unset properties that should not be set for default tool style.
This list needs to be reviewed.
Definition at line 1498 of file style.cpp.
References css, and sp_repr_css_set_property().
Referenced by Inkscape::UI::Dialog::StyleFromSelectionToTool(), and take_style_from_item().
Unset any text-related properties.
Definition at line 1444 of file style.cpp.
References css, and sp_repr_css_set_property().
Referenced by sp_desktop_get_style(), sp_desktop_set_style(), Inkscape::UI::Dialog::StyleFromSelectionToTool(), and take_style_from_item().
Unset any properties that contain URI values.
Used for storing style that will be reused across documents when carrying the referenced defs is impractical.
Definition at line 1543 of file style.cpp.
References css, is_url(), sp_repr_css_property(), and sp_repr_css_set_property().
Referenced by Inkscape::UI::Tools::TweakTool::set_style(), sp_desktop_set_style(), and Inkscape::UI::Dialog::StyleFromSelectionToTool().
double sp_style_css_size_px_to_units | ( | double | size, |
int | unit, | ||
double | font_size = SP_CSS_FONT_SIZE_DEFAULT |
||
) |
Definition at line 1332 of file style.cpp.
References Inkscape::Util::Quantity::convert(), size, SP_CSS_UNIT_CM, SP_CSS_UNIT_EM, SP_CSS_UNIT_EX, SP_CSS_UNIT_IN, SP_CSS_UNIT_MM, SP_CSS_UNIT_NONE, SP_CSS_UNIT_PC, SP_CSS_UNIT_PERCENT, SP_CSS_UNIT_PT, and SP_CSS_UNIT_PX.
Referenced by Inkscape::UI::Toolbar::TextToolbar::_selectionChanged(), SPIFontSize::get_value(), Inkscape::UI::Dialog::TextEdit::onReadSelection(), and sp_style_css_size_units_to_px().
double sp_style_css_size_units_to_px | ( | double | size, |
int | unit, | ||
double | font_size = SP_CSS_FONT_SIZE_DEFAULT |
||
) |
Definition at line 1367 of file style.cpp.
References size, SP_CSS_UNIT_PX, and sp_style_css_size_px_to_units().
Referenced by Inkscape::UI::Dialog::TextEdit::fillTextStyle(), Inkscape::UI::Toolbar::TextToolbar::fontsize_value_changed(), and Inkscape::UI::Dialog::TextEdit::setPreviewText().
char const * sp_style_get_css_unit_string | ( | int | unit | ) |
Definition at line 1305 of file style.cpp.
References SP_CSS_UNIT_CM, SP_CSS_UNIT_EM, SP_CSS_UNIT_EX, SP_CSS_UNIT_IN, SP_CSS_UNIT_MM, SP_CSS_UNIT_NONE, SP_CSS_UNIT_PC, SP_CSS_UNIT_PERCENT, SP_CSS_UNIT_PT, and SP_CSS_UNIT_PX.
Referenced by Inkscape::UI::Toolbar::TextToolbar::_selectionChanged(), SPText::description(), Inkscape::UI::Dialog::TextEdit::fillTextStyle(), Inkscape::UI::Toolbar::TextToolbar::fontsize_value_changed(), SPILength::get_value(), SPIFontSize::get_value(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::UI::Widget::FontSelector::set_fontsize_tooltip(), and Inkscape::UI::Toolbar::TextToolbar::TextToolbar().
void sp_style_set_property_url | ( | SPObject * | item, |
char const * | property, | ||
SPObject * | linked, | ||
bool | recursive | ||
) |
void sp_style_set_to_uri | ( | SPStyle * | style, |
bool | isfill, | ||
Inkscape::URI const * | uri | ||
) |
Definition at line 1298 of file style.cpp.
References SPStyle::document, SPStyle::getFillOrStroke(), and sp_style_set_ipaint_to_uri().
Referenced by objects_query_fillstroke().
void sp_style_unset_property_attrs | ( | SPObject * | o | ) |