Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
style.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_SP_STYLE_H
3#define SEEN_SP_STYLE_H
4
8/* Authors:
9 * Lauris Kaplinski <lauris@kaplinski.com>
10 * Jon A. Cruz <jon@joncruz.org>
11 * Tavmjong Bah <tavmjong@free.fr>
12 *
13 * Copyright (C) 2014 Tavmjong Bah
14 * Copyright (C) 2010 Jon A. Cruz
15 * Copyright (C) 2001-2002 Lauris Kaplinski
16 * Copyright (C) 2001 Ximian, Inc.
17 *
18 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
19 */
20
21#include "style-enums.h"
22#include "style-internal.h"
23
24#include <sigc++/connection.h>
25#include <iostream>
26#include <map>
27#include <vector>
28
31
32enum class SPAttr;
33
34// Define SPIBasePtr, a Pointer to a data member of SPStyle of type SPIBase;
36
37namespace Inkscape {
38namespace XML {
39class Node;
40}
41}
42
45{
46public:
47 SPStyle(SPDocument *document = nullptr, SPObject *object = nullptr); // document is ignored if valid object given
48 ~SPStyle();
49 std::vector<SPIBase *> const &properties() const { return _properties; }
50 void clear();
51 void clear(SPAttr id);
52 void read(SPObject *object, Inkscape::XML::Node *repr);
53 void readFromObject(SPObject *object);
54 void readFromPrefs(Glib::ustring const &path);
55 bool isSet(SPAttr id);
56 void readIfUnset(SPAttr id, char const *val, SPStyleSrc const &source = SPStyleSrc::STYLE_PROP);
57
58private:
59 Glib::ustring write(unsigned flags, SPStyleSrc style_src_req, SPStyle const *base = nullptr) const;
60
61public:
62 Glib::ustring write(unsigned flags = SP_STYLE_FLAG_IFSET) const;
63 Glib::ustring write(SPStyleSrc style_src_req) const;
64 Glib::ustring writeIfDiff(SPStyle const *base) const;
65
66 void cascade(SPStyle const *parent);
67 void merge( SPStyle const *parent);
68 void mergeString(char const *p);
69 void mergeCSS(SPCSSAttr *css);
70 void mergeStatement(CRStatement *statement);
71 bool operator==(SPStyle const &rhs) const;
72
73private:
74 void _mergeString(char const *p);
75 void _mergeDeclList(CRDeclaration const *decl_list, SPStyleSrc const &source);
76 void _mergeDecl( CRDeclaration const *decl, SPStyleSrc const &source);
78 void _mergeObjectStylesheet(SPObject const *object);
80
81// FIXME: Make private
82public:
87
88private:
90 std::vector<SPIBase *> _properties;
91
92 // Shorthand for better readability
93 template <SPAttr Id, class Base>
95
96public:
97 /* ----------------------- THE PROPERTIES ------------------------- */
98 /* Match order in style.cpp. */
99
100 /* SVG 2 attributes promoted to properties. */
101
104
105 /* Font ---------------------------- */
106
125
126 /* Font variants -------------------- */
141
144
145 /* Text ----------------------------- */
146
151
158
159 /* CSS3 Text */
170
171 /* SVG */
174
177
184
185 /* Text Decoration ----------------------- */
186
196 // used to implement text_decoration, not saved to or read from SVG file
198
199 // 16.3.2 is text-shadow. That's complicated.
200
201 /* General visual properties ------------- */
202
205
208
211
214
217
221
223
230
235
238
245
264
271
272 /* Filter effects ------------------------ */
273
278 // TODO remove, find other logic for querying
282
286
287 /* Rendering hints ----------------------- */
288
295
296 /* ----------------------- END PROPERTIES ------------------------- */
297
299 bool cloned;
300
304
305 sigc::connection release_connection;
306
310
314
322 sigc::signal<void (SPObject *, SPObject *)> signal_fill_ps_changed;
323
328 sigc::signal<void (SPObject *, SPObject *)> signal_stroke_ps_changed;
329
333 sigc::signal<void (SPObject *, SPObject *)> signal_filter_changed;
334
335 SPFilter *getFilter() { return (filter.href) ? filter.href->getObject() : nullptr; }
336 SPFilter const *getFilter() const { return (filter.href) ? filter.href->getObject() : nullptr; }
337 Inkscape::URI const *getFilterURI() const { return (filter.href) ? filter.href->getURI() : nullptr; }
338
339 SPPaintServer *getFillPaintServer() { return (fill.href) ? fill.href->getObject() : nullptr; }
340 SPPaintServer const *getFillPaintServer() const { return (fill.href) ? fill.href->getObject() : nullptr; }
341 Inkscape::URI const *getFillURI() const { return (fill.href) ? fill.href->getURI() : nullptr; }
342
343 SPPaintServer *getStrokePaintServer() { return (stroke.href) ? stroke.href->getObject() : nullptr; }
344 SPPaintServer const *getStrokePaintServer() const { return (stroke.href) ? stroke.href->getObject() : nullptr; }
345 Inkscape::URI const *getStrokeURI() const { return (stroke.href) ? stroke.href->getURI() : nullptr; }
346
350 std::string getFontFeatureString();
351
355 SPIPaint *getFillOrStroke(bool fill_) { return fill_ ? fill.upcast() : stroke.upcast(); }
356 SPIPaint const *getFillOrStroke(bool fill_) const { return fill_ ? fill.upcast() : stroke.upcast(); }
357
358 /* ----------------------- EXTENDED PROPERTIES ------------------------- */
359 std::map<std::string, std::string> extended_properties;
360};
361
362void sp_style_set_to_uri(SPStyle *style, bool isfill, Inkscape::URI const *uri); // ?
363
364char const *sp_style_get_css_unit_string(int unit); // No change?
365
366#define SP_CSS_FONT_SIZE_DEFAULT 12.0
367double sp_style_css_size_px_to_units(double size, int unit, double font_size = SP_CSS_FONT_SIZE_DEFAULT); // No change?
368double sp_style_css_size_units_to_px(double size, int unit, double font_size = SP_CSS_FONT_SIZE_DEFAULT); // No change?
369
370
371SPCSSAttr *sp_css_attr_from_style (SPStyle const *const style, unsigned int flags);
377
379
380void sp_style_set_property_url (SPObject *item, char const *property, SPObject *linked, bool recursive);
381
382void css_quote( Glib::ustring &val ); // Add quotes around CSS values
383void css_unquote( Glib::ustring &val ); // Remove quotes from CSS values (style-internal.cpp, xml/repr-css.cpp)
384void css_font_family_quote( Glib::ustring &val ); // style-internal.cpp, text-toolbar.cpp
385void css_font_family_unquote( Glib::ustring &val ); // style-internal.cpp, text-toolbar.cpp
386
387Glib::ustring css2_escape_quote(char const *val);
388
389#endif // SEEN_SP_STYLE_H
390
391
392/*
393 Local Variables:
394 mode:c++
395 c-file-style:"stroustrup"
396 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
397 indent-tabs-mode:nil
398 fill-column:99
399 End:
400*/
401// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
402
static SPStyleProp const props[]
Lookup dictionary for attributes/properties.
SPAttr
Definition attributes.h:27
Represents an URI as per RFC 2396.
Definition uri.h:36
Interface for refcounted XML nodes.
Definition node.h:80
Typed SVG document implementation.
Definition document.h:103
std::unique_ptr< SPFilterReference > href
Definition sp-filter.h:69
Virtual base class for all SPStyle internal classes.
Paint type internal to SPStyle.
String type internal to SPStyle.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
An SVG style object.
Definition style.h:45
bool isSet(SPAttr id)
Definition style.cpp:706
T< SPAttr::FONT_VARIANT_EAST_ASIAN, SPIEastAsian > font_variant_east_asian
Font variant East Asian.
Definition style.h:138
SPPaintServer const * getFillPaintServer() const
Definition style.h:340
void clear()
Definition style.cpp:505
T< SPAttr::TEXT_DECORATION_LINE, SPITextDecorationLine > text_decoration_line
CSS 3 2.1, 2.2, 2.3.
Definition style.h:191
void merge(SPStyle const *parent)
Combine style and parent style specifications into a single style specification that preserves (as mu...
Definition style.cpp:843
T< SPAttr::COLOR_INTERPOLATION, SPIEnum< SPColorInterpolation > > color_interpolation
color-interpolation
Definition style.h:227
T< SPAttr::COLOR, SPIColor > color
color
Definition style.h:225
T< SPAttr::SHAPE_PADDING, SPILength > shape_padding
Definition style.h:181
void mergeCSS(SPCSSAttr *css)
Definition style.cpp:859
Inkscape::URI const * getFilterURI() const
Definition style.h:337
T< SPAttr::FONT_WEIGHT, SPIEnum< SPCSSFontWeight > > font_weight
Weight of the font.
Definition style.h:112
T< SPAttr::TEXT_DECORATION_STYLE, SPITextDecorationStyle > text_decoration_style
Definition style.h:192
sigc::signal< void(SPObject *, SPObject *)> signal_fill_ps_changed
Emitted when the fill paint server changes, meaning it starts pointing to a different object.
Definition style.h:322
SPPaintServer const * getStrokePaintServer() const
Definition style.h:344
Glib::ustring writeIfDiff(SPStyle const *base) const
Get CSS string for set properties which are different from the given base style.
Definition style.cpp:799
sigc::connection fill_ps_changed_connection
Definition style.h:312
SPPaintServer * getFillPaintServer()
Definition style.h:339
T< SPAttr::FILL, SPIPaint > fill
fill
Definition style.h:240
T< SPAttr::COLOR_INTERPOLATION_FILTERS, SPIEnum< SPColorInterpolation > > color_interpolation_filters
color-interpolation-filters
Definition style.h:229
T< SPAttr::ENABLE_BACKGROUND, SPIEnum< SPEnableBackground > > enable_background
enable-background, used for defining where filter effects get their background image
Definition style.h:281
T< SPAttr::STROKE_DASHARRAY, SPIDashArray > stroke_dasharray
stroke-dasharray
Definition style.h:257
bool block_filter_bbox_updates
(hack) Temporarily set to true to block filter changes from updating the object's bbox in situations ...
Definition style.h:303
T< SPAttr::STROKE, SPIPaint > stroke
stroke
Definition style.h:247
SPFilter * getFilter()
Definition style.h:335
T< SPAttr::CLIP_RULE, SPIEnum< SPWindRule > > clip_rule
clip-rule: 0 nonzero, 1 evenodd
Definition style.h:204
T< SPAttr::STOP_COLOR, SPIColor > stop_color
gradient-stop
Definition style.h:284
T< SPAttr::LINE_HEIGHT, SPILengthOrNormal > line_height
Line height (css2 10.8.1)
Definition style.h:118
Inkscape::URI const * getStrokeURI() const
Definition style.h:345
T< SPAttr::TEXT_DECORATION_FILL, SPIPaint > text_decoration_fill
Definition style.h:194
SPPaintServer * getStrokePaintServer()
Definition style.h:343
T< SPAttr::D, SPIString > d
Path data.
Definition style.h:103
void _mergeDeclList(CRDeclaration const *decl_list, SPStyleSrc const &source)
Definition style.cpp:913
SPObject * object
Object we are attached to.
Definition style.h:84
T< SPAttr::FONT_FEATURE_SETTINGS, SPIString > font_feature_settings
Font feature settings (Low level access to TrueType tables)
Definition style.h:140
T< SPAttr::LETTER_SPACING, SPILengthOrNormal > letter_spacing
letter spacing (css2 16.4)
Definition style.h:153
void mergeStatement(CRStatement *statement)
Append an existing css statement into this style, used in css editing always appends declarations as ...
Definition style.cpp:870
void _mergeProps(CRPropList *props)
Definition style.cpp:967
void readFromObject(SPObject *object)
Read style properties from object's repr.
Definition style.cpp:608
SPITextDecorationData text_decoration_data
Definition style.h:197
T< SPAttr::PAINT_ORDER, SPIPaintOrder > paint_order
Definition style.h:222
T< SPAttr::FONT_FAMILY, SPIString > font_family
Font family.
Definition style.h:120
T< SPAttr::INKSCAPE_FONT_SPEC, SPIString > font_specification
Full font name, as FontFactory::ConstructFontSpecification would give, for internal use.
Definition style.h:124
T< SPAttr::MARKER_END, SPIString > marker_end
Definition style.h:269
T< SPAttr::STROKE_WIDTH, SPILength > stroke_width
stroke-width
Definition style.h:249
bool cloned
style belongs to a cloned object
Definition style.h:299
std::string getFontFeatureString()
Return a font feature string useful for Pango.
Definition style.cpp:1017
T< SPAttr::TEXT_DECORATION_COLOR, SPIColor > text_decoration_color
Definition style.h:193
T< SPAttr::TEXT_DECORATION, SPITextDecoration > text_decoration
text decoration (css2 16.3.1)
Definition style.h:188
T< SPAttr::DIRECTION, SPIEnum< SPCSSDirection > > direction
text direction (svg1.1)
Definition style.h:161
T< SPAttr::FILL_RULE, SPIEnum< SPWindRule > > fill_rule
fill-rule: 0 nonzero, 1 evenodd
Definition style.h:244
T< SPAttr::FILL_OPACITY, SPIScale24 > fill_opacity
fill-opacity
Definition style.h:242
T< SPAttr::FONT_STYLE, SPIEnum< SPCSSFontStyle > > font_style
Font style.
Definition style.h:108
T< SPAttr::SOLID_OPACITY, SPIScale24 > solid_opacity
solid-opacity
Definition style.h:234
T< SPAttr::FONT_VARIANT, SPIEnum< SPCSSFontVariant > > font_variant
Which substyle of the font (CSS 2.
Definition style.h:110
Glib::ustring write(unsigned flags, SPStyleSrc style_src_req, SPStyle const *base=nullptr) const
T< SPAttr::DOMINANT_BASELINE, SPIEnum< SPCSSBaseline > > dominant_baseline
Dominant baseline (svg1.1)
Definition style.h:167
std::map< std::string, std::string > extended_properties
Definition style.h:359
T< SPAttr::STROKE_LINEJOIN, SPIEnum< SPStrokeJoinType > > stroke_linejoin
stroke-linejoin
Definition style.h:253
T< SPAttr::MARKER_START, SPIString > marker_start
Definition style.h:267
T< SPAttr::WHITE_SPACE, SPIEnum< SPWhiteSpace > > white_space
white space (svg2)
Definition style.h:176
SPIPaint * getFillOrStroke(bool fill_)
Get either the fill or the stroke property.
Definition style.h:355
T< SPAttr::WORD_SPACING, SPILengthOrNormal > word_spacing
word spacing (also css2 16.4)
Definition style.h:155
std::vector< SPIBase * > _properties
Pointers to all the properties (for looping through them)
Definition style.h:90
sigc::signal< void(SPObject *, SPObject *)> signal_stroke_ps_changed
Emitted when the stroke paint server changes, meaning it starts pointing to a different object.
Definition style.h:328
T< SPAttr::STROKE_OPACITY, SPIScale24 > stroke_opacity
stroke-opacity
Definition style.h:261
sigc::connection filter_modified_connection
Definition style.h:307
T< SPAttr::FONT_STRETCH, SPIEnum< SPCSSFontStretch > > font_stretch
Stretch of the font.
Definition style.h:114
void mergeString(char const *p)
Parses a style="..." string and merges it with an existing SPStyle.
Definition style.cpp:854
T< SPAttr::MARKER_MID, SPIString > marker_mid
Definition style.h:268
SPFilter const * getFilter() const
Definition style.h:336
void readIfUnset(SPAttr id, char const *val, SPStyleSrc const &source=SPStyleSrc::STYLE_PROP)
Definition style.cpp:650
T< SPAttr::INLINE_SIZE, SPILength > inline_size
Definition style.h:183
void read(SPObject *object, Inkscape::XML::Node *repr)
Definition style.cpp:539
T< SPAttr::TEXT_ALIGN, SPIEnum< SPCSSTextAlign > > text_align
text alignment (css2 16.2) (not to be confused with text-anchor)
Definition style.h:150
T< SPAttr::STROKE_MITERLIMIT, SPIFloat > stroke_miterlimit
stroke-miterlimit
Definition style.h:255
T< SPAttr::COLOR_RENDERING, SPIEnum< SPColorRendering > > color_rendering
hints on how to render: e.g.
Definition style.h:291
T< SPAttr::FONT_VARIANT_NUMERIC, SPINumeric > font_variant_numeric
Font variant numeric (numerical formatting)
Definition style.h:134
T< SPAttr::MARKER, SPIString > marker
Marker list.
Definition style.h:266
T< SPAttr::TEXT_ANCHOR, SPIEnum< SPTextAnchor > > text_anchor
Anchor of the text (svg1.1 10.9.1)
Definition style.h:173
T< SPAttr::DISPLAY, SPIEnum< SPCSSDisplay > > display
display
Definition style.h:207
T< SPAttr::SHAPE_INSIDE, SPIShapes > shape_inside
SVG2 Text Wrapping.
Definition style.h:179
Glib::ustring write(unsigned flags=SP_STYLE_FLAG_IFSET) const
T< SPAttr::ISOLATION, SPIEnum< SPIsolation > > isolation
mix-blend-mode: CSS Compositing and Blending Level 1
Definition style.h:219
T< SPAttr::VISIBILITY, SPIEnum< SPVisibility > > visibility
visibility
Definition style.h:213
Inkscape::URI const * getFillURI() const
Definition style.h:341
sigc::connection filter_changed_connection
Definition style.h:311
sigc::connection fill_ps_modified_connection
Definition style.h:308
T< SPAttr::TEXT_DECORATION_STROKE, SPIPaint > text_decoration_stroke
Definition style.h:195
T< SPAttr::FONT_VARIANT_CAPS, SPIEnum< SPCSSFontVariantCaps > > font_variant_caps
Font variant caps (small caps)
Definition style.h:132
void _mergeObjectStylesheet(SPObject const *object)
Definition style.cpp:981
sigc::connection stroke_ps_changed_connection
Definition style.h:313
T< SPAttr::MIX_BLEND_MODE, SPIEnum< SPBlendMode > > mix_blend_mode
Definition style.h:220
T< SPAttr::OPACITY, SPIScale24 > opacity
opacity
Definition style.h:216
T< SPAttr::FILTER, SPIFilter > filter
Filter effect.
Definition style.h:275
T< SPAttr::STROKE_LINECAP, SPIEnum< SPStrokeCapType > > stroke_linecap
stroke-linecap
Definition style.h:251
T< SPAttr::FONT_VARIANT_POSITION, SPIEnum< SPCSSFontVariantPosition > > font_variant_position
Font variant position (subscript/superscript)
Definition style.h:130
T< SPAttr::FONT, SPIFont > font
Font shorthand.
Definition style.h:122
T< SPAttr::IMAGE_RENDERING, SPIEnum< SPImageRendering > > image_rendering
Definition style.h:292
SPIString * marker_ptrs[SP_MARKER_LOC_QTY]
Definition style.h:270
T< SPAttr::STROKE_DASHOFFSET, SPILength > stroke_dashoffset
stroke-dashoffset
Definition style.h:259
std::vector< SPIBase * > const & properties() const
Definition style.h:49
T< SPAttr::FONT_VARIANT_ALTERNATES, SPIEnum< SPCSSFontVariantAlternates > > font_variant_alternates
Font variant alternates (alternates/swatches)
Definition style.h:136
T< SPAttr::SHAPE_MARGIN, SPILength > shape_margin
Definition style.h:182
T< SPAttr::WRITING_MODE, SPIEnum< SPCSSWritingMode > > writing_mode
Writing mode (svg1.1 10.7.2, CSS Writing Modes 3)
Definition style.h:163
T< SPAttr::STROKE_EXTENSIONS, SPIStrokeExtensions > stroke_extensions
-inkscape-stroke
Definition style.h:263
T< SPAttr::SOLID_COLOR, SPIColor > solid_color
solid-color
Definition style.h:232
T< SPAttr::STOP_OPACITY, SPIScale24 > stop_opacity
Definition style.h:285
T< SPAttr::SHAPE_SUBTRACT, SPIShapes > shape_subtract
Definition style.h:180
bool operator==(SPStyle const &rhs) const
Definition style.cpp:883
sigc::signal< void(SPObject *, SPObject *)> signal_filter_changed
Emitted when the filter changes, meaning it starts pointing to a different object.
Definition style.h:333
T< SPAttr::TEXT_INDENT, SPILength > text_indent
First line indent of paragraphs (css2 16.1)
Definition style.h:148
T< SPAttr::TEXT_RENDERING, SPIEnum< SPTextRendering > > text_rendering
Definition style.h:294
void readFromPrefs(Glib::ustring const &path)
Read style properties from preferences.
Definition style.cpp:625
T< SPAttr::TEXT_ORIENTATION, SPIEnum< SPCSSTextOrientation > > text_orientation
Text orientation (CSS Writing Modes 3)
Definition style.h:165
~SPStyle()
Definition style.cpp:467
T< SPAttr::SHAPE_RENDERING, SPIEnum< SPShapeRendering > > shape_rendering
Definition style.h:293
void _mergeString(char const *p)
Definition style.cpp:901
T< SPAttr::TEXT_TRANSFORM, SPIEnum< SPCSSTextTransform > > text_transform
capitalization (css2 16.5)
Definition style.h:157
sigc::connection stroke_ps_modified_connection
Definition style.h:309
T< SPAttr::FONT_SIZE, SPIFontSize > font_size
Size of the font.
Definition style.h:116
T< SPAttr::VECTOR_EFFECT, SPIVectorEffect > vector_effect
vector effect
Definition style.h:237
void cascade(SPStyle const *parent)
Sets computed values in style, which may involve inheriting from (or in some other way calculating fr...
Definition style.cpp:817
T< SPAttr::INVALID, SPILength > filter_gaussianBlur_deviation
normally not used, but duplicates the Gaussian blur deviation (if any) from the attached filter when ...
Definition style.h:279
T< SPAttr::FONT_VARIANT_LIGATURES, SPILigatures > font_variant_ligatures
Font variant ligatures.
Definition style.h:128
sigc::connection release_connection
Definition style.h:305
SPDocument * document
Document we are associated with.
Definition style.h:86
T< SPAttr::OVERFLOW_, SPIEnum< SPOverflow > > overflow
overflow
Definition style.h:210
void _mergeDecl(CRDeclaration const *decl, SPStyleSrc const &source)
Definition style.cpp:927
T< SPAttr::FONT_VARIATION_SETTINGS, SPIFontVariationSettings > font_variation_settings
Font variation settings (Low level access to OpenType variable font design-coordinate values)
Definition style.h:143
SPIPaint const * getFillOrStroke(bool fill_) const
Definition style.h:356
T< SPAttr::BASELINE_SHIFT, SPIBaselineShift > baseline_shift
Baseline shift (svg1.1 10.9.2)
Definition style.h:169
Decorator which overrides SPIBase::id()
The declaration of the CRDeclaration class.
typedefG_BEGIN_DECLS struct _CRPropList CRPropList
std::shared_ptr< Css const > css
static char const *const parent
Definition dir-util.cpp:70
SPItem * item
Helper class to stream background task notifications as a series of messages.
int size
@ SP_MARKER_LOC_QTY
The abstraction of css statement as defined in the chapter 4 and appendix D.1 of the css2 spec.
SPStyle enums: named public enums that correspond to SVG property values.
SPStyle internal: classes that are internal to SPStyle.
SPStyleSrc
static const unsigned SP_STYLE_FLAG_IFSET(1<< 0)
SPCSSAttr * sp_css_attr_unset_blacklist(SPCSSAttr *css)
Unset properties that should not be set for default tool style.
Definition style.cpp:1498
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...
Definition style.cpp:1722
SPCSSAttr * sp_css_attr_unset_text(SPCSSAttr *css)
Unset any text-related properties.
Definition style.cpp:1444
double sp_style_css_size_px_to_units(double size, int unit, double font_size=SP_CSS_FONT_SIZE_DEFAULT)
Definition style.cpp:1332
double sp_style_css_size_units_to_px(double size, int unit, double font_size=SP_CSS_FONT_SIZE_DEFAULT)
Definition style.cpp:1367
void sp_style_set_property_url(SPObject *item, char const *property, SPObject *linked, bool recursive)
SPCSSAttr * sp_css_attr_scale(SPCSSAttr *css, double ex)
Scale any properties that may hold <length> by ex.
Definition style.cpp:1625
void css_quote(Glib::ustring &val)
Quote and/or escape string for writing to CSS, changing strings in place.
Definition style.cpp:1646
Glib::ustring css2_escape_quote(char const *val)
void sp_style_set_to_uri(SPStyle *style, bool isfill, Inkscape::URI const *uri)
Definition style.cpp:1298
SPIBase SPStyle::* SPIBasePtr
Definition style.h:35
SPCSSAttr * sp_css_attr_unset_uris(SPCSSAttr *css)
Unset any properties that contain URI values.
Definition style.cpp:1543
void sp_style_unset_property_attrs(SPObject *o)
void css_unquote(Glib::ustring &val)
Remove paired single and double quotes from a string, changing string in place.
Definition style.cpp:1704
SPCSSAttr * sp_css_attr_from_object(SPObject *object, unsigned int flags=SP_STYLE_FLAG_IFSET)
SPCSSAttr * sp_css_attr_from_style(SPStyle const *const style, unsigned int flags)
char const * sp_style_get_css_unit_string(int unit)
Definition style.cpp:1305
void css_font_family_quote(Glib::ustring &val)
Quote font names in font-family lists, changing string in place.
Definition style.cpp:1685