24#include <sigc++/connection.h>
93 template <SPAttr Id,
class Base>
366#define SP_CSS_FONT_SIZE_DEFAULT 12.0
static SPStyleProp const props[]
Lookup dictionary for attributes/properties.
Represents an URI as per RFC 2396.
Interface for refcounted XML nodes.
Typed SVG document implementation.
std::unique_ptr< SPFilterReference > href
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.
T< SPAttr::FONT_VARIANT_EAST_ASIAN, SPIEastAsian > font_variant_east_asian
Font variant East Asian.
SPPaintServer const * getFillPaintServer() const
T< SPAttr::TEXT_DECORATION_LINE, SPITextDecorationLine > text_decoration_line
CSS 3 2.1, 2.2, 2.3.
void merge(SPStyle const *parent)
Combine style and parent style specifications into a single style specification that preserves (as mu...
T< SPAttr::COLOR_INTERPOLATION, SPIEnum< SPColorInterpolation > > color_interpolation
color-interpolation
T< SPAttr::COLOR, SPIColor > color
color
T< SPAttr::SHAPE_PADDING, SPILength > shape_padding
void mergeCSS(SPCSSAttr *css)
Inkscape::URI const * getFilterURI() const
T< SPAttr::FONT_WEIGHT, SPIEnum< SPCSSFontWeight > > font_weight
Weight of the font.
T< SPAttr::TEXT_DECORATION_STYLE, SPITextDecorationStyle > text_decoration_style
sigc::signal< void(SPObject *, SPObject *)> signal_fill_ps_changed
Emitted when the fill paint server changes, meaning it starts pointing to a different object.
SPPaintServer const * getStrokePaintServer() const
Glib::ustring writeIfDiff(SPStyle const *base) const
Get CSS string for set properties which are different from the given base style.
sigc::connection fill_ps_changed_connection
SPPaintServer * getFillPaintServer()
T< SPAttr::FILL, SPIPaint > fill
fill
T< SPAttr::COLOR_INTERPOLATION_FILTERS, SPIEnum< SPColorInterpolation > > color_interpolation_filters
color-interpolation-filters
T< SPAttr::ENABLE_BACKGROUND, SPIEnum< SPEnableBackground > > enable_background
enable-background, used for defining where filter effects get their background image
T< SPAttr::STROKE_DASHARRAY, SPIDashArray > stroke_dasharray
stroke-dasharray
bool block_filter_bbox_updates
(hack) Temporarily set to true to block filter changes from updating the object's bbox in situations ...
T< SPAttr::STROKE, SPIPaint > stroke
stroke
T< SPAttr::CLIP_RULE, SPIEnum< SPWindRule > > clip_rule
clip-rule: 0 nonzero, 1 evenodd
T< SPAttr::STOP_COLOR, SPIColor > stop_color
gradient-stop
T< SPAttr::LINE_HEIGHT, SPILengthOrNormal > line_height
Line height (css2 10.8.1)
Inkscape::URI const * getStrokeURI() const
T< SPAttr::TEXT_DECORATION_FILL, SPIPaint > text_decoration_fill
SPPaintServer * getStrokePaintServer()
T< SPAttr::D, SPIString > d
Path data.
void _mergeDeclList(CRDeclaration const *decl_list, SPStyleSrc const &source)
SPObject * object
Object we are attached to.
T< SPAttr::FONT_FEATURE_SETTINGS, SPIString > font_feature_settings
Font feature settings (Low level access to TrueType tables)
T< SPAttr::LETTER_SPACING, SPILengthOrNormal > letter_spacing
letter spacing (css2 16.4)
void mergeStatement(CRStatement *statement)
Append an existing css statement into this style, used in css editing always appends declarations as ...
void _mergeProps(CRPropList *props)
void readFromObject(SPObject *object)
Read style properties from object's repr.
SPITextDecorationData text_decoration_data
T< SPAttr::PAINT_ORDER, SPIPaintOrder > paint_order
T< SPAttr::FONT_FAMILY, SPIString > font_family
Font family.
T< SPAttr::INKSCAPE_FONT_SPEC, SPIString > font_specification
Full font name, as FontFactory::ConstructFontSpecification would give, for internal use.
T< SPAttr::MARKER_END, SPIString > marker_end
T< SPAttr::STROKE_WIDTH, SPILength > stroke_width
stroke-width
bool cloned
style belongs to a cloned object
std::string getFontFeatureString()
Return a font feature string useful for Pango.
T< SPAttr::TEXT_DECORATION_COLOR, SPIColor > text_decoration_color
T< SPAttr::TEXT_DECORATION, SPITextDecoration > text_decoration
text decoration (css2 16.3.1)
T< SPAttr::DIRECTION, SPIEnum< SPCSSDirection > > direction
text direction (svg1.1)
T< SPAttr::FILL_RULE, SPIEnum< SPWindRule > > fill_rule
fill-rule: 0 nonzero, 1 evenodd
T< SPAttr::FILL_OPACITY, SPIScale24 > fill_opacity
fill-opacity
T< SPAttr::FONT_STYLE, SPIEnum< SPCSSFontStyle > > font_style
Font style.
T< SPAttr::SOLID_OPACITY, SPIScale24 > solid_opacity
solid-opacity
T< SPAttr::FONT_VARIANT, SPIEnum< SPCSSFontVariant > > font_variant
Which substyle of the font (CSS 2.
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)
std::map< std::string, std::string > extended_properties
T< SPAttr::STROKE_LINEJOIN, SPIEnum< SPStrokeJoinType > > stroke_linejoin
stroke-linejoin
T< SPAttr::MARKER_START, SPIString > marker_start
T< SPAttr::WHITE_SPACE, SPIEnum< SPWhiteSpace > > white_space
white space (svg2)
SPIPaint * getFillOrStroke(bool fill_)
Get either the fill or the stroke property.
T< SPAttr::WORD_SPACING, SPILengthOrNormal > word_spacing
word spacing (also css2 16.4)
std::vector< SPIBase * > _properties
Pointers to all the properties (for looping through them)
sigc::signal< void(SPObject *, SPObject *)> signal_stroke_ps_changed
Emitted when the stroke paint server changes, meaning it starts pointing to a different object.
T< SPAttr::STROKE_OPACITY, SPIScale24 > stroke_opacity
stroke-opacity
sigc::connection filter_modified_connection
T< SPAttr::FONT_STRETCH, SPIEnum< SPCSSFontStretch > > font_stretch
Stretch of the font.
void mergeString(char const *p)
Parses a style="..." string and merges it with an existing SPStyle.
T< SPAttr::MARKER_MID, SPIString > marker_mid
SPFilter const * getFilter() const
void readIfUnset(SPAttr id, char const *val, SPStyleSrc const &source=SPStyleSrc::STYLE_PROP)
T< SPAttr::INLINE_SIZE, SPILength > inline_size
void read(SPObject *object, Inkscape::XML::Node *repr)
T< SPAttr::TEXT_ALIGN, SPIEnum< SPCSSTextAlign > > text_align
text alignment (css2 16.2) (not to be confused with text-anchor)
T< SPAttr::STROKE_MITERLIMIT, SPIFloat > stroke_miterlimit
stroke-miterlimit
T< SPAttr::COLOR_RENDERING, SPIEnum< SPColorRendering > > color_rendering
hints on how to render: e.g.
T< SPAttr::FONT_VARIANT_NUMERIC, SPINumeric > font_variant_numeric
Font variant numeric (numerical formatting)
T< SPAttr::MARKER, SPIString > marker
Marker list.
T< SPAttr::TEXT_ANCHOR, SPIEnum< SPTextAnchor > > text_anchor
Anchor of the text (svg1.1 10.9.1)
T< SPAttr::DISPLAY, SPIEnum< SPCSSDisplay > > display
display
T< SPAttr::SHAPE_INSIDE, SPIShapes > shape_inside
SVG2 Text Wrapping.
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
T< SPAttr::VISIBILITY, SPIEnum< SPVisibility > > visibility
visibility
Inkscape::URI const * getFillURI() const
sigc::connection filter_changed_connection
sigc::connection fill_ps_modified_connection
T< SPAttr::TEXT_DECORATION_STROKE, SPIPaint > text_decoration_stroke
T< SPAttr::FONT_VARIANT_CAPS, SPIEnum< SPCSSFontVariantCaps > > font_variant_caps
Font variant caps (small caps)
void _mergeObjectStylesheet(SPObject const *object)
sigc::connection stroke_ps_changed_connection
T< SPAttr::MIX_BLEND_MODE, SPIEnum< SPBlendMode > > mix_blend_mode
T< SPAttr::OPACITY, SPIScale24 > opacity
opacity
T< SPAttr::FILTER, SPIFilter > filter
Filter effect.
T< SPAttr::STROKE_LINECAP, SPIEnum< SPStrokeCapType > > stroke_linecap
stroke-linecap
T< SPAttr::FONT_VARIANT_POSITION, SPIEnum< SPCSSFontVariantPosition > > font_variant_position
Font variant position (subscript/superscript)
T< SPAttr::FONT, SPIFont > font
Font shorthand.
T< SPAttr::IMAGE_RENDERING, SPIEnum< SPImageRendering > > image_rendering
SPIString * marker_ptrs[SP_MARKER_LOC_QTY]
T< SPAttr::STROKE_DASHOFFSET, SPILength > stroke_dashoffset
stroke-dashoffset
std::vector< SPIBase * > const & properties() const
T< SPAttr::FONT_VARIANT_ALTERNATES, SPIEnum< SPCSSFontVariantAlternates > > font_variant_alternates
Font variant alternates (alternates/swatches)
T< SPAttr::SHAPE_MARGIN, SPILength > shape_margin
T< SPAttr::WRITING_MODE, SPIEnum< SPCSSWritingMode > > writing_mode
Writing mode (svg1.1 10.7.2, CSS Writing Modes 3)
T< SPAttr::STROKE_EXTENSIONS, SPIStrokeExtensions > stroke_extensions
-inkscape-stroke
T< SPAttr::SOLID_COLOR, SPIColor > solid_color
solid-color
T< SPAttr::STOP_OPACITY, SPIScale24 > stop_opacity
T< SPAttr::SHAPE_SUBTRACT, SPIShapes > shape_subtract
bool operator==(SPStyle const &rhs) const
sigc::signal< void(SPObject *, SPObject *)> signal_filter_changed
Emitted when the filter changes, meaning it starts pointing to a different object.
T< SPAttr::TEXT_INDENT, SPILength > text_indent
First line indent of paragraphs (css2 16.1)
T< SPAttr::TEXT_RENDERING, SPIEnum< SPTextRendering > > text_rendering
void readFromPrefs(Glib::ustring const &path)
Read style properties from preferences.
T< SPAttr::TEXT_ORIENTATION, SPIEnum< SPCSSTextOrientation > > text_orientation
Text orientation (CSS Writing Modes 3)
T< SPAttr::SHAPE_RENDERING, SPIEnum< SPShapeRendering > > shape_rendering
void _mergeString(char const *p)
T< SPAttr::TEXT_TRANSFORM, SPIEnum< SPCSSTextTransform > > text_transform
capitalization (css2 16.5)
sigc::connection stroke_ps_modified_connection
T< SPAttr::FONT_SIZE, SPIFontSize > font_size
Size of the font.
T< SPAttr::VECTOR_EFFECT, SPIVectorEffect > vector_effect
vector effect
void cascade(SPStyle const *parent)
Sets computed values in style, which may involve inheriting from (or in some other way calculating fr...
T< SPAttr::INVALID, SPILength > filter_gaussianBlur_deviation
normally not used, but duplicates the Gaussian blur deviation (if any) from the attached filter when ...
T< SPAttr::FONT_VARIANT_LIGATURES, SPILigatures > font_variant_ligatures
Font variant ligatures.
sigc::connection release_connection
SPDocument * document
Document we are associated with.
T< SPAttr::OVERFLOW_, SPIEnum< SPOverflow > > overflow
overflow
void _mergeDecl(CRDeclaration const *decl, SPStyleSrc const &source)
T< SPAttr::FONT_VARIATION_SETTINGS, SPIFontVariationSettings > font_variation_settings
Font variation settings (Low level access to OpenType variable font design-coordinate values)
SPIPaint const * getFillOrStroke(bool fill_) const
T< SPAttr::BASELINE_SHIFT, SPIBaselineShift > baseline_shift
Baseline shift (svg1.1 10.9.2)
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
Helper class to stream background task notifications as a series of messages.
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.
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.
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...
SPCSSAttr * sp_css_attr_unset_text(SPCSSAttr *css)
Unset any text-related properties.
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)
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.
void css_quote(Glib::ustring &val)
Quote and/or escape string for writing to CSS, changing strings in place.
Glib::ustring css2_escape_quote(char const *val)
void sp_style_set_to_uri(SPStyle *style, bool isfill, Inkscape::URI const *uri)
SPIBase SPStyle::* SPIBasePtr
SPCSSAttr * sp_css_attr_unset_uris(SPCSSAttr *css)
Unset any properties that contain URI values.
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.
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)
void css_font_family_quote(Glib::ustring &val)
Quote font names in font-family lists, changing string in place.