Inkscape
Vector Graphics Editor
SPStyle Class Reference

An SVG style object. More...

#include <style.h>

Public Member Functions

 SPStyle (SPDocument *document=nullptr, SPObject *object=nullptr)
 
 ~SPStyle ()
 
const std::vector< SPIBase * > properties ()
 
void clear ()
 
void clear (SPAttr id)
 
void read (SPObject *object, Inkscape::XML::Node *repr)
 
void readFromObject (SPObject *object)
 Read style properties from object's repr. More...
 
void readFromPrefs (Glib::ustring const &path)
 Read style properties from preferences. More...
 
bool isSet (SPAttr id)
 
void readIfUnset (SPAttr id, char const *val, SPStyleSrc const &source=SPStyleSrc::STYLE_PROP)
 
Glib::ustring write (unsigned flags=SP_STYLE_FLAG_IFSET) const
 
Glib::ustring write (SPStyleSrc style_src_req) const
 Get CSS string for set properties from the requested source. More...
 
Glib::ustring writeIfDiff (SPStyle const *base) const
 Get CSS string for set properties which are different from the given base style. More...
 
void cascade (SPStyle const *parent)
 Sets computed values in style, which may involve inheriting from (or in some other way calculating from) corresponding computed values of parent. More...
 
void merge (SPStyle const *parent)
 Combine style and parent style specifications into a single style specification that preserves (as much as possible) the effect of the existing style being a child of parent. More...
 
void mergeString (char const *p)
 Parses a style="..." string and merges it with an existing SPStyle. More...
 
void mergeCSS (SPCSSAttr *css)
 
void mergeStatement (CRStatement *statement)
 Append an existing css statement into this style, used in css editing always appends declarations as STYLE_SHEET properties. More...
 
bool operator== (SPStyle const &rhs) const
 
SPFiltergetFilter ()
 
SPFilter const * getFilter () const
 
Inkscape::URI const * getFilterURI () const
 
SPPaintServergetFillPaintServer ()
 
SPPaintServer const * getFillPaintServer () const
 
Inkscape::URI const * getFillURI () const
 
SPPaintServergetStrokePaintServer ()
 
SPPaintServer const * getStrokePaintServer () const
 
Inkscape::URI const * getStrokeURI () const
 
std::string getFontFeatureString ()
 Return a font feature string useful for Pango. More...
 
SPIPaintgetFillOrStroke (bool fill_)
 Get either the fill or the stroke property. More...
 
SPIPaint const * getFillOrStroke (bool fill_) const
 

Public Attributes

SPObjectobject
 Object we are attached to. More...
 
SPDocumentdocument
 Document we are associated with. More...
 
T< SPAttr::D, SPIStringd
 Path data. More...
 
T< SPAttr::FONT_STYLE, SPIEnum< SPCSSFontStyle > > font_style
 Font style. More...
 
T< SPAttr::FONT_VARIANT, SPIEnum< SPCSSFontVariant > > font_variant
 Which substyle of the font (CSS 2. More...
 
T< SPAttr::FONT_WEIGHT, SPIEnum< SPCSSFontWeight > > font_weight
 Weight of the font. More...
 
T< SPAttr::FONT_STRETCH, SPIEnum< SPCSSFontStretch > > font_stretch
 Stretch of the font. More...
 
T< SPAttr::FONT_SIZE, SPIFontSizefont_size
 Size of the font. More...
 
T< SPAttr::LINE_HEIGHT, SPILengthOrNormalline_height
 Line height (css2 10.8.1) More...
 
T< SPAttr::FONT_FAMILY, SPIStringfont_family
 Font family. More...
 
T< SPAttr::FONT, SPIFontfont
 Font shorthand. More...
 
T< SPAttr::INKSCAPE_FONT_SPEC, SPIStringfont_specification
 Full font name, as FontFactory::ConstructFontSpecification would give, for internal use. More...
 
T< SPAttr::FONT_VARIANT_LIGATURES, SPILigaturesfont_variant_ligatures
 Font variant ligatures. More...
 
T< SPAttr::FONT_VARIANT_POSITION, SPIEnum< SPCSSFontVariantPosition > > font_variant_position
 Font variant position (subscript/superscript) More...
 
T< SPAttr::FONT_VARIANT_CAPS, SPIEnum< SPCSSFontVariantCaps > > font_variant_caps
 Font variant caps (small caps) More...
 
T< SPAttr::FONT_VARIANT_NUMERIC, SPINumericfont_variant_numeric
 Font variant numeric (numerical formatting) More...
 
T< SPAttr::FONT_VARIANT_ALTERNATES, SPIEnum< SPCSSFontVariantAlternates > > font_variant_alternates
 Font variant alternates (alternates/swatches) More...
 
T< SPAttr::FONT_VARIANT_EAST_ASIAN, SPIEastAsianfont_variant_east_asian
 Font variant East Asian. More...
 
T< SPAttr::FONT_FEATURE_SETTINGS, SPIStringfont_feature_settings
 Font feature settings (Low level access to TrueType tables) More...
 
T< SPAttr::FONT_VARIATION_SETTINGS, SPIFontVariationSettingsfont_variation_settings
 Font variation settings (Low level access to OpenType variable font design-coordinate values) More...
 
T< SPAttr::TEXT_INDENT, SPILengthtext_indent
 First line indent of paragraphs (css2 16.1) More...
 
T< SPAttr::TEXT_ALIGN, SPIEnum< SPCSSTextAlign > > text_align
 text alignment (css2 16.2) (not to be confused with text-anchor) More...
 
T< SPAttr::LETTER_SPACING, SPILengthOrNormalletter_spacing
 letter spacing (css2 16.4) More...
 
T< SPAttr::WORD_SPACING, SPILengthOrNormalword_spacing
 word spacing (also css2 16.4) More...
 
T< SPAttr::TEXT_TRANSFORM, SPIEnum< SPCSSTextTransform > > text_transform
 capitalization (css2 16.5) More...
 
T< SPAttr::DIRECTION, SPIEnum< SPCSSDirection > > direction
 text direction (svg1.1) More...
 
T< SPAttr::WRITING_MODE, SPIEnum< SPCSSWritingMode > > writing_mode
 Writing mode (svg1.1 10.7.2, CSS Writing Modes 3) More...
 
T< SPAttr::TEXT_ORIENTATION, SPIEnum< SPCSSTextOrientation > > text_orientation
 Text orientation (CSS Writing Modes 3) More...
 
T< SPAttr::DOMINANT_BASELINE, SPIEnum< SPCSSBaseline > > dominant_baseline
 Dominant baseline (svg1.1) More...
 
T< SPAttr::BASELINE_SHIFT, SPIBaselineShiftbaseline_shift
 Baseline shift (svg1.1 10.9.2) More...
 
T< SPAttr::TEXT_ANCHOR, SPIEnum< SPTextAnchor > > text_anchor
 Anchor of the text (svg1.1 10.9.1) More...
 
T< SPAttr::WHITE_SPACE, SPIEnum< SPWhiteSpace > > white_space
 white space (svg2) More...
 
T< SPAttr::SHAPE_INSIDE, SPIShapesshape_inside
 SVG2 Text Wrapping. More...
 
T< SPAttr::SHAPE_SUBTRACT, SPIShapesshape_subtract
 
T< SPAttr::SHAPE_PADDING, SPILengthshape_padding
 
T< SPAttr::SHAPE_MARGIN, SPILengthshape_margin
 
T< SPAttr::INLINE_SIZE, SPILengthinline_size
 
T< SPAttr::TEXT_DECORATION, SPITextDecorationtext_decoration
 text decoration (css2 16.3.1) More...
 
T< SPAttr::TEXT_DECORATION_LINE, SPITextDecorationLinetext_decoration_line
 CSS 3 2.1, 2.2, 2.3. More...
 
T< SPAttr::TEXT_DECORATION_STYLE, SPITextDecorationStyletext_decoration_style
 
T< SPAttr::TEXT_DECORATION_COLOR, SPIColortext_decoration_color
 
T< SPAttr::TEXT_DECORATION_FILL, SPIPainttext_decoration_fill
 
T< SPAttr::TEXT_DECORATION_STROKE, SPIPainttext_decoration_stroke
 
SPITextDecorationData text_decoration_data
 
T< SPAttr::CLIP_RULE, SPIEnum< SPWindRule > > clip_rule
 clip-rule: 0 nonzero, 1 evenodd More...
 
T< SPAttr::DISPLAY, SPIEnum< SPCSSDisplay > > display
 display More...
 
T< SPAttr::OVERFLOW_, SPIEnum< SPOverflow > > overflow
 overflow More...
 
T< SPAttr::VISIBILITY, SPIEnum< SPVisibility > > visibility
 visibility More...
 
T< SPAttr::OPACITY, SPIScale24opacity
 opacity More...
 
T< SPAttr::ISOLATION, SPIEnum< SPIsolation > > isolation
 mix-blend-mode: CSS Compositing and Blending Level 1 More...
 
T< SPAttr::MIX_BLEND_MODE, SPIEnum< SPBlendMode > > mix_blend_mode
 
T< SPAttr::PAINT_ORDER, SPIPaintOrderpaint_order
 
T< SPAttr::COLOR, SPIColorcolor
 color More...
 
T< SPAttr::COLOR_INTERPOLATION, SPIEnum< SPColorInterpolation > > color_interpolation
 color-interpolation More...
 
T< SPAttr::COLOR_INTERPOLATION_FILTERS, SPIEnum< SPColorInterpolation > > color_interpolation_filters
 color-interpolation-filters More...
 
T< SPAttr::SOLID_COLOR, SPIColorsolid_color
 solid-color More...
 
T< SPAttr::SOLID_OPACITY, SPIScale24solid_opacity
 solid-opacity More...
 
T< SPAttr::VECTOR_EFFECT, SPIVectorEffectvector_effect
 vector effect More...
 
T< SPAttr::FILL, SPIPaintfill
 fill More...
 
T< SPAttr::FILL_OPACITY, SPIScale24fill_opacity
 fill-opacity More...
 
T< SPAttr::FILL_RULE, SPIEnum< SPWindRule > > fill_rule
 fill-rule: 0 nonzero, 1 evenodd More...
 
T< SPAttr::STROKE, SPIPaintstroke
 stroke More...
 
T< SPAttr::STROKE_WIDTH, SPILengthstroke_width
 stroke-width More...
 
T< SPAttr::STROKE_LINECAP, SPIEnum< SPStrokeCapType > > stroke_linecap
 stroke-linecap More...
 
T< SPAttr::STROKE_LINEJOIN, SPIEnum< SPStrokeJoinType > > stroke_linejoin
 stroke-linejoin More...
 
T< SPAttr::STROKE_MITERLIMIT, SPIFloatstroke_miterlimit
 stroke-miterlimit More...
 
T< SPAttr::STROKE_DASHARRAY, SPIDashArraystroke_dasharray
 stroke-dasharray More...
 
T< SPAttr::STROKE_DASHOFFSET, SPILengthstroke_dashoffset
 stroke-dashoffset More...
 
T< SPAttr::STROKE_OPACITY, SPIScale24stroke_opacity
 stroke-opacity More...
 
T< SPAttr::STROKE_EXTENSIONS, SPIStrokeExtensionsstroke_extensions
 -inkscape-stroke More...
 
T< SPAttr::MARKER, SPIStringmarker
 Marker list. More...
 
T< SPAttr::MARKER_START, SPIStringmarker_start
 
T< SPAttr::MARKER_MID, SPIStringmarker_mid
 
T< SPAttr::MARKER_END, SPIStringmarker_end
 
SPIStringmarker_ptrs [SP_MARKER_LOC_QTY]
 
T< SPAttr::FILTER, SPIFilterfilter
 Filter effect. More...
 
T< SPAttr::INVALID, SPILengthfilter_gaussianBlur_deviation
 normally not used, but duplicates the Gaussian blur deviation (if any) from the attached filter when the style is used for querying More...
 
T< SPAttr::ENABLE_BACKGROUND, SPIEnum< SPEnableBackground > > enable_background
 enable-background, used for defining where filter effects get their background image More...
 
T< SPAttr::STOP_COLOR, SPIColorstop_color
 gradient-stop More...
 
T< SPAttr::STOP_OPACITY, SPIScale24stop_opacity
 
T< SPAttr::COLOR_RENDERING, SPIEnum< SPColorRendering > > color_rendering
 hints on how to render: e.g. More...
 
T< SPAttr::IMAGE_RENDERING, SPIEnum< SPImageRendering > > image_rendering
 
T< SPAttr::SHAPE_RENDERING, SPIEnum< SPShapeRendering > > shape_rendering
 
T< SPAttr::TEXT_RENDERING, SPIEnum< SPTextRendering > > text_rendering
 
bool cloned
 style belongs to a cloned object More...
 
bool block_filter_bbox_updates = false
 (hack) Temporarily set to true to block filter changes from updating the object's bbox in situations where this update is undesirable. More...
 
sigc::connection release_connection
 
sigc::connection filter_modified_connection
 
sigc::connection fill_ps_modified_connection
 
sigc::connection stroke_ps_modified_connection
 
sigc::connection filter_changed_connection
 
sigc::connection fill_ps_changed_connection
 
sigc::connection stroke_ps_changed_connection
 
sigc::signal< void(SPObject *, SPObject *)> signal_fill_ps_changed
 Emitted when the fill paint server changes, meaning it starts pointing to a different object. More...
 
sigc::signal< void(SPObject *, SPObject *)> signal_stroke_ps_changed
 Emitted when the stroke paint server changes, meaning it starts pointing to a different object. More...
 
sigc::signal< void(SPObject *, SPObject *)> signal_filter_changed
 Emitted when the filter changes, meaning it starts pointing to a different object. More...
 
std::map< std::string, std::string > extended_properties
 

Private Types

template<SPAttr Id, class Base >
using T = TypedSPI< Id, Base >
 

Private Member Functions

Glib::ustring write (unsigned flags, SPStyleSrc style_src_req, SPStyle const *base=nullptr) const
 
void _mergeString (char const *p)
 
void _mergeDeclList (CRDeclaration const *decl_list, SPStyleSrc const &source)
 
void _mergeDecl (CRDeclaration const *decl, SPStyleSrc const &source)
 
void _mergeProps (CRPropList *props)
 
void _mergeObjectStylesheet (SPObject const *object)
 
void _mergeObjectStylesheet (SPObject const *object, SPDocument *document)
 

Private Attributes

std::vector< SPIBase * > _properties
 Pointers to all the properties (for looping through them) More...
 

Detailed Description

An SVG style object.

Definition at line 44 of file style.h.

Member Typedef Documentation

◆ T

template<SPAttr Id, class Base >
using SPStyle::T = TypedSPI<Id, Base>
private

Definition at line 94 of file style.h.

Constructor & Destructor Documentation

◆ SPStyle()

◆ ~SPStyle()

Member Function Documentation

◆ _mergeDecl()

void SPStyle::_mergeDecl ( CRDeclaration const *  decl,
SPStyleSrc const &  source 
)
private
Todo:
effic: Test whether the property is already set before trying to convert to string. Alternatively, set from CRTerm directly rather than converting to string.

Definition at line 925 of file style.cpp.

References cr_term_to_string(), extended_properties, _CRDeclaration::important, INVALID, isSet(), key, readIfUnset(), sp_attribute_lookup(), Inkscape::CSSOStringStream::str(), and _CRDeclaration::value.

Referenced by _mergeDeclList(), and _mergeProps().

◆ _mergeDeclList()

void SPStyle::_mergeDeclList ( CRDeclaration const *  decl_list,
SPStyleSrc const &  source 
)
private

Definition at line 911 of file style.cpp.

References _mergeDecl(), _mergeDeclList(), and _CRDeclaration::next.

Referenced by _mergeDeclList(), _mergeString(), and mergeStatement().

◆ _mergeObjectStylesheet() [1/2]

void SPStyle::_mergeObjectStylesheet ( SPObject const *  object)
private

Definition at line 979 of file style.cpp.

References _mergeObjectStylesheet(), SPObject::document, and object.

Referenced by _mergeObjectStylesheet(), and read().

◆ _mergeObjectStylesheet() [2/2]

void SPStyle::_mergeObjectStylesheet ( SPObject const *  object,
SPDocument document 
)
private

◆ _mergeProps()

void SPStyle::_mergeProps ( CRPropList props)
private

◆ _mergeString()

void SPStyle::_mergeString ( char const *  p)
private

◆ cascade()

void SPStyle::cascade ( SPStyle const *  parent)

Sets computed values in style, which may involve inheriting from (or in some other way calculating from) corresponding computed values of parent.

References: http://www.w3.org/TR/SVG11/propidx.html shows what properties inherit by default. http://www.w3.org/TR/SVG11/styling.html#Inheritance gives general rules as to what it means to inherit a value. http://www.w3.org/TR/REC-CSS2/cascade.html#computed-value is more precise about what the computed value is (not obvious for lengths).

Precondition
parent's computed values are already up-to-date.

Definition at line 815 of file style.cpp.

References _properties, and parent.

Referenced by read(), sp_tref_convert_to_tspan(), SPUse::unlink(), and SPObject::updateDisplay().

◆ clear() [1/2]

◆ clear() [2/2]

void SPStyle::clear ( SPAttr  id)

Definition at line 497 of file style.cpp.

References _prop_helper, and SPIBase::clear().

◆ getFillOrStroke() [1/2]

◆ getFillOrStroke() [2/2]

SPIPaint const * SPStyle::getFillOrStroke ( bool  fill_) const
inline

Definition at line 356 of file style.h.

References fill, and stroke.

◆ getFillPaintServer() [1/2]

◆ getFillPaintServer() [2/2]

SPPaintServer const * SPStyle::getFillPaintServer ( ) const
inline

Definition at line 340 of file style.h.

References fill.

◆ getFillURI()

Inkscape::URI const * SPStyle::getFillURI ( ) const
inline

Definition at line 341 of file style.h.

References fill.

Referenced by objects_query_fillstroke().

◆ getFilter() [1/2]

◆ getFilter() [2/2]

SPFilter const * SPStyle::getFilter ( ) const
inline

Definition at line 336 of file style.h.

References filter.

◆ getFilterURI()

Inkscape::URI const * SPStyle::getFilterURI ( ) const
inline

Definition at line 337 of file style.h.

References filter.

◆ getFontFeatureString()

◆ getStrokePaintServer() [1/2]

◆ getStrokePaintServer() [2/2]

SPPaintServer const * SPStyle::getStrokePaintServer ( ) const
inline

Definition at line 344 of file style.h.

References stroke.

◆ getStrokeURI()

Inkscape::URI const * SPStyle::getStrokeURI ( ) const
inline

Definition at line 345 of file style.h.

References stroke.

Referenced by objects_query_fillstroke().

◆ isSet()

bool SPStyle::isSet ( SPAttr  id)

Definition at line 704 of file style.cpp.

References _prop_helper, CLIP_PATH, COLOR_INTERPOLATION, color_interpolation, FILTER, filter, MASK, and set.

Referenced by _mergeDecl().

◆ merge()

void SPStyle::merge ( SPStyle const *  parent)

Combine style and parent style specifications into a single style specification that preserves (as much as possible) the effect of the existing style being a child of parent.

Called when the parent repr is to be removed (e.g. the parent is a <use> element that is being unlinked), in which case we copy/adapt property values that are explicitly set in parent, trying to retain the same visual appearance once the parent is removed. Interesting cases are when there is unusual interaction with the parent's value (opacity, display) or when the value can be specified as relative to the parent computed value (font-size, font-weight etc.).

Doesn't update computed values of style. For correctness, you should subsequently call sp_style_merge_from_parent against the new parent (presumably parent's parent) even if style was previously up-to-date wrt parent.

Precondition
parent's computed values are already up-to-date. (style's computed values needn't be up-to-date.)

Definition at line 841 of file style.cpp.

References _properties, and parent.

Referenced by SPShape::print(), sp_selected_item_to_curved_repr(), sp_tref_convert_to_tspan(), text_to_glyphs(), and SPUse::unlink().

◆ mergeCSS()

◆ mergeStatement()

void SPStyle::mergeStatement ( CRStatement statement)

Append an existing css statement into this style, used in css editing always appends declarations as STYLE_SHEET properties.

Definition at line 868 of file style.cpp.

References _mergeDeclList(), cr_statement_ruleset_get_declarations(), RULESET_STMT, STYLE_SHEET, and _CRStatement::type.

◆ mergeString()

void SPStyle::mergeString ( char const *  p)

◆ operator==()

bool SPStyle::operator== ( SPStyle const &  rhs) const

Definition at line 881 of file style.cpp.

References _properties.

◆ properties()

const std::vector< SPIBase * > SPStyle::properties ( )

◆ read()

◆ readFromObject()

void SPStyle::readFromObject ( SPObject object)

Read style properties from object's repr.

  1. Reset existing object style
  2. Load current effective object style
  3. Load i attributes from immediate parent (which has to be up-to-date)

Definition at line 606 of file style.cpp.

References read().

Referenced by Inkscape::UI::Dialog::SelectorsDialog::_removeFromSelector(), Inkscape::UI::Dialog::StyleDialog::readStyleElement(), SPItem::set(), SPObject::updateDisplay(), and SPObject::write().

◆ readFromPrefs()

void SPStyle::readFromPrefs ( Glib::ustring const &  path)

◆ readIfUnset()

void SPStyle::readIfUnset ( SPAttr  id,
char const *  val,
SPStyleSrc const &  source = SPStyleSrc::STYLE_PROP 
)
Todo:
This is a workaround. Inkscape only supports 'clip-path' as SVG attribute, not as style property. By having both CSS and SVG attribute set, editing of clip-path will fail, since CSS always overwrites SVG attributes. Fixes Bug #324849
Todo:
See comment for SPAttr::CLIP_PATH

Definition at line 648 of file style.cpp.

References _prop_helper, CLIP_PATH, COLOR_INTERPOLATION, color_interpolation, FILTER, filter, MASK, and SP_CSS_COLOR_INTERPOLATION_SRGB.

Referenced by _mergeDecl(), and SPPattern::produce().

◆ write() [1/3]

Glib::ustring SPStyle::write ( SPStyleSrc  style_src_req) const

Get CSS string for set properties from the requested source.

Definition at line 788 of file style.cpp.

References SP_STYLE_FLAG_IFSET(), SP_STYLE_FLAG_IFSRC(), UNSET, and write().

◆ write() [2/3]

Glib::ustring SPStyle::write ( unsigned  flags,
SPStyleSrc  style_src_req,
SPStyle const *  base = nullptr 
) const
private

◆ write() [3/3]

Glib::ustring SPStyle::write ( unsigned  flags = SP_STYLE_FLAG_IFSET) const

◆ writeIfDiff()

Glib::ustring SPStyle::writeIfDiff ( SPStyle const *  base) const

Get CSS string for set properties which are different from the given base style.

If base is NULL, all set flags are considered different.

Definition at line 797 of file style.cpp.

References SP_STYLE_FLAG_IFDIFF(), UNSET, and write().

Referenced by SPFlowtext::getAsText(), item_to_paths(), sp_selected_item_to_curved_repr(), and text_to_glyphs().

Member Data Documentation

◆ _properties

std::vector<SPIBase *> SPStyle::_properties
private

Pointers to all the properties (for looping through them)

Definition at line 90 of file style.h.

Referenced by cascade(), clear(), merge(), operator==(), properties(), read(), and SPStyle().

◆ baseline_shift

◆ block_filter_bbox_updates

bool SPStyle::block_filter_bbox_updates = false

(hack) Temporarily set to true to block filter changes from updating the object's bbox in situations where this update is undesirable.

Definition at line 303 of file style.h.

Referenced by sp_style_filter_ref_modified(), and SPObject::updateDisplay().

◆ clip_rule

T<SPAttr::CLIP_RULE, SPIEnum<SPWindRule> > SPStyle::clip_rule

clip-rule: 0 nonzero, 1 evenodd

Definition at line 204 of file style.h.

Referenced by Inkscape::DrawingShape::setStyle(), and Inkscape::DrawingText::setStyle().

◆ cloned

bool SPStyle::cloned

style belongs to a cloned object

Definition at line 299 of file style.h.

Referenced by clear(), read(), and SPStyle().

◆ color

T<SPAttr::COLOR, SPIColor> SPStyle::color

color

Definition at line 225 of file style.h.

Referenced by SPIPaint::cascade(), SPStop::getColor(), SPIColor::read(), SPIPaint::read(), and SPStyle().

◆ color_interpolation

T<SPAttr::COLOR_INTERPOLATION, SPIEnum<SPColorInterpolation> > SPStyle::color_interpolation

color-interpolation

Definition at line 227 of file style.h.

Referenced by isSet(), and readIfUnset().

◆ color_interpolation_filters

T<SPAttr::COLOR_INTERPOLATION_FILTERS, SPIEnum<SPColorInterpolation> > SPStyle::color_interpolation_filters

color-interpolation-filters

Definition at line 229 of file style.h.

Referenced by Inkscape::Filters::FilterPrimitive::setStyle().

◆ color_rendering

T<SPAttr::COLOR_RENDERING, SPIEnum<SPColorRendering> > SPStyle::color_rendering

hints on how to render: e.g.

speed vs. accuracy. As of April, 2013, only image_rendering used.

Definition at line 291 of file style.h.

◆ d

T<SPAttr::D, SPIString> SPStyle::d

Path data.

Definition at line 103 of file style.h.

Referenced by SPPath::build().

◆ direction

◆ display

◆ document

SPDocument* SPStyle::document

◆ dominant_baseline

T<SPAttr::DOMINANT_BASELINE, SPIEnum<SPCSSBaseline> > SPStyle::dominant_baseline

Dominant baseline (svg1.1)

Definition at line 167 of file style.h.

◆ enable_background

T<SPAttr::ENABLE_BACKGROUND, SPIEnum<SPEnableBackground> > SPStyle::enable_background

enable-background, used for defining where filter effects get their background image

Definition at line 281 of file style.h.

Referenced by Inkscape::DrawingItem::setStyle().

◆ extended_properties

std::map<std::string, std::string> SPStyle::extended_properties

Definition at line 359 of file style.h.

Referenced by _mergeDecl().

◆ fill

T<SPAttr::FILL, SPIPaint> SPStyle::fill

fill

Definition at line 240 of file style.h.

Referenced by SPHatch::_countHrefs(), SPPattern::_countHrefs(), Inkscape::Extension::Internal::CairoRenderContext::_setFillStyle(), SPHatchPath::_updateView(), KnotHolder::add_hatch_knotholder(), SPItem::adjust_gradient(), SPItem::adjust_hatch(), SPItem::adjust_pattern(), SPHatchPath::build(), clear(), convert_fill_color(), count_gradient_hrefs(), Inkscape::Extension::Internal::PrintEmf::create_brush(), Inkscape::Extension::Internal::PrintWmf::create_brush(), Inkscape::UI::createKnotHolder(), default_color(), Inkscape::Extension::Internal::PovOutput::doCurve(), Inkscape::Extension::Internal::PrintLatex::fill(), Inkscape::UI::Tools::MeshTool::fit_mesh_in_bbox(), getFillOrStroke(), getFillPaintServer(), getFillURI(), getGradient(), gr_apply_gradient_to_item(), gr_drag_style_query(), gr_get_dt_selected_gradient(), gr_read_selection(), has_fill(), item_to_paths(), Inkscape::LivePathEffect::lpe_shape_convert_stroke_and_fill(), Inkscape::LivePathEffect::lpe_shape_revert_stroke_and_fill(), ms_get_dt_selected_gradients(), Inkscape::Extension::Internal::Emf::myEnhMetaFileProc(), Inkscape::NRStyleData::NRStyleData(), Inkscape::Extension::Internal::Emf::output_style(), Inkscape::Extension::Internal::Wmf::output_style(), SPShape::print(), Inkscape::Text::Layout::print(), Inkscape::Extension::Internal::OdfOutput::processGradient(), Inkscape::Extension::Internal::OdfOutput::processStyle(), SPIPaint::read(), GrDrag::refreshDraggers(), SPObject::release(), Inkscape::Extension::Internal::CairoRenderContext::renderGlyphtext(), Inkscape::Extension::Internal::CairoRenderContext::renderPathVector(), revert_stroke_color(), Inkscape::Extension::Internal::Emf::select_brush(), Inkscape::Extension::Internal::Wmf::select_brush(), Inkscape::Extension::Internal::CairoRenderContext::setStateForStyle(), Inkscape::UI::Widget::StyleSwatch::setStyle(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_flowtext_render(), sp_item_set_gradient(), sp_style_paint_server_ref_modified(), sp_style_set_ipaint_to_uri(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_text_render(), Inkscape::UI::Tools::sp_tweak_color_recursive(), SPStyle(), Inkscape::ObjectSet::swapFillStroke(), Inkscape::Extension::Internal::PrintEmf::text(), Inkscape::Extension::Internal::PrintWmf::text(), Inkscape::ObjectSet::untile(), Inkscape::UI::Widget::SelectedStyle::update(), GrDrag::updateDraggers(), Inkscape::UI::Widget::FillNStroke::updateFromPaint(), GrDrag::updateLines(), and ~SPStyle().

◆ fill_opacity

◆ fill_ps_changed_connection

sigc::connection SPStyle::fill_ps_changed_connection

Definition at line 312 of file style.h.

Referenced by clear(), SPIPaint::read(), sp_style_set_ipaint_to_uri(), and ~SPStyle().

◆ fill_ps_modified_connection

sigc::connection SPStyle::fill_ps_modified_connection

Definition at line 308 of file style.h.

Referenced by clear(), sp_style_fill_paint_server_ref_changed(), and ~SPStyle().

◆ fill_rule

◆ filter

◆ filter_changed_connection

sigc::connection SPStyle::filter_changed_connection

Definition at line 311 of file style.h.

Referenced by clear(), SPIFilter::read(), and ~SPStyle().

◆ filter_gaussianBlur_deviation

T<SPAttr::INVALID, SPILength> SPStyle::filter_gaussianBlur_deviation

normally not used, but duplicates the Gaussian blur deviation (if any) from the attached filter when the style is used for querying

Definition at line 279 of file style.h.

Referenced by Inkscape::UI::Widget::ObjectCompositeSettings::_subjectChanged(), and objects_query_blur().

◆ filter_modified_connection

sigc::connection SPStyle::filter_modified_connection

Definition at line 307 of file style.h.

Referenced by clear(), sp_style_filter_ref_changed(), and ~SPStyle().

◆ font

T<SPAttr::FONT, SPIFont> SPStyle::font

Font shorthand.

Definition at line 122 of file style.h.

Referenced by SPStyle().

◆ font_family

◆ font_feature_settings

T<SPAttr::FONT_FEATURE_SETTINGS, SPIString> SPStyle::font_feature_settings

Font feature settings (Low level access to TrueType tables)

Definition at line 140 of file style.h.

Referenced by getFontFeatureString(), objects_query_fontfeaturesettings(), and Inkscape::UI::Widget::FontVariants::update().

◆ font_size

◆ font_specification

T<SPAttr::INKSCAPE_FONT_SPEC, SPIString> SPStyle::font_specification

◆ font_stretch

T<SPAttr::FONT_STRETCH, SPIEnum<SPCSSFontStretch> > SPStyle::font_stretch

Stretch of the font.

Definition at line 114 of file style.h.

Referenced by ink_font_description_from_style(), objects_query_fontstyle(), and SPIFont::read().

◆ font_style

◆ font_variant

T<SPAttr::FONT_VARIANT, SPIEnum<SPCSSFontVariant> > SPStyle::font_variant

Which substyle of the font (CSS 2.

CSS 3 redefines as shorthand)

Definition at line 110 of file style.h.

Referenced by ink_font_description_from_style(), objects_query_fontstyle(), and SPIFont::read().

◆ font_variant_alternates

Font variant alternates (alternates/swatches)

Definition at line 136 of file style.h.

◆ font_variant_caps

T<SPAttr::FONT_VARIANT_CAPS, SPIEnum<SPCSSFontVariantCaps> > SPStyle::font_variant_caps

Font variant caps (small caps)

Definition at line 132 of file style.h.

Referenced by getFontFeatureString(), objects_query_fontvariants(), and Inkscape::UI::Widget::FontVariants::update().

◆ font_variant_east_asian

T<SPAttr::FONT_VARIANT_EAST_ASIAN, SPIEastAsian> SPStyle::font_variant_east_asian

Font variant East Asian.

Definition at line 138 of file style.h.

Referenced by getFontFeatureString(), objects_query_fontvariants(), and Inkscape::UI::Widget::FontVariants::update().

◆ font_variant_ligatures

T<SPAttr::FONT_VARIANT_LIGATURES, SPILigatures> SPStyle::font_variant_ligatures

Font variant ligatures.

Definition at line 128 of file style.h.

Referenced by getFontFeatureString(), objects_query_fontvariants(), and Inkscape::UI::Widget::FontVariants::update().

◆ font_variant_numeric

T<SPAttr::FONT_VARIANT_NUMERIC, SPINumeric> SPStyle::font_variant_numeric

Font variant numeric (numerical formatting)

Definition at line 134 of file style.h.

Referenced by getFontFeatureString(), objects_query_fontvariants(), and Inkscape::UI::Widget::FontVariants::update().

◆ font_variant_position

Font variant position (subscript/superscript)

Definition at line 130 of file style.h.

Referenced by getFontFeatureString(), objects_query_fontvariants(), and Inkscape::UI::Widget::FontVariants::update().

◆ font_variation_settings

T<SPAttr::FONT_VARIATION_SETTINGS, SPIFontVariationSettings> SPStyle::font_variation_settings

Font variation settings (Low level access to OpenType variable font design-coordinate values)

Definition at line 143 of file style.h.

Referenced by ink_font_description_from_style(), and objects_query_fontstyle().

◆ font_weight

◆ image_rendering

◆ inline_size

◆ isolation

◆ letter_spacing

◆ line_height

◆ marker

T<SPAttr::MARKER, SPIString> SPStyle::marker

Marker list.

Definition at line 266 of file style.h.

Referenced by sp_get_same_style(), and SPStyle().

◆ marker_end

T<SPAttr::MARKER_END, SPIString> SPStyle::marker_end

Definition at line 269 of file style.h.

Referenced by SPStyle().

◆ marker_mid

T<SPAttr::MARKER_MID, SPIString> SPStyle::marker_mid

Definition at line 268 of file style.h.

Referenced by SPStyle().

◆ marker_ptrs

◆ marker_start

T<SPAttr::MARKER_START, SPIString> SPStyle::marker_start

Definition at line 267 of file style.h.

Referenced by SPStyle().

◆ mix_blend_mode

◆ object

◆ opacity

◆ overflow

◆ paint_order

◆ release_connection

sigc::connection SPStyle::release_connection

Definition at line 305 of file style.h.

Referenced by clear(), SPStyle(), and ~SPStyle().

◆ shape_inside

◆ shape_margin

T<SPAttr::SHAPE_MARGIN, SPILength> SPStyle::shape_margin

Definition at line 182 of file style.h.

Referenced by SPStyle().

◆ shape_padding

T<SPAttr::SHAPE_PADDING, SPILength> SPStyle::shape_padding

◆ shape_rendering

T<SPAttr::SHAPE_RENDERING, SPIEnum<SPShapeRendering> > SPStyle::shape_rendering

Definition at line 293 of file style.h.

Referenced by SPShape::show(), and SPItem::update().

◆ shape_subtract

◆ signal_fill_ps_changed

sigc::signal<void (SPObject *, SPObject *)> SPStyle::signal_fill_ps_changed

Emitted when the fill paint server changes, meaning it starts pointing to a different object.

Note that this is different from the fill_ps_modified signal, which happens when some of its attributes or children have changed.

Definition at line 322 of file style.h.

Referenced by sp_style_fill_paint_server_ref_changed(), and SPItem::SPItem().

◆ signal_filter_changed

sigc::signal<void (SPObject *, SPObject *)> SPStyle::signal_filter_changed

Emitted when the filter changes, meaning it starts pointing to a different object.

Definition at line 333 of file style.h.

Referenced by BlurKnotHolderEntity::on_created(), sp_style_filter_ref_changed(), and SPItem::SPItem().

◆ signal_stroke_ps_changed

sigc::signal<void (SPObject *, SPObject *)> SPStyle::signal_stroke_ps_changed

Emitted when the stroke paint server changes, meaning it starts pointing to a different object.

Definition at line 328 of file style.h.

Referenced by sp_style_stroke_paint_server_ref_changed(), and SPItem::SPItem().

◆ solid_color

T<SPAttr::SOLID_COLOR, SPIColor> SPStyle::solid_color

solid-color

Definition at line 232 of file style.h.

Referenced by SPSolidColor::create_drawing_paintserver(), and SPStyle().

◆ solid_opacity

T<SPAttr::SOLID_OPACITY, SPIScale24> SPStyle::solid_opacity

solid-opacity

Definition at line 234 of file style.h.

Referenced by SPSolidColor::create_drawing_paintserver().

◆ stop_color

T<SPAttr::STOP_COLOR, SPIColor> SPStyle::stop_color

gradient-stop

Definition at line 284 of file style.h.

Referenced by SPStop::getColor(), and SPStyle().

◆ stop_opacity

T<SPAttr::STOP_OPACITY, SPIScale24> SPStyle::stop_opacity

Definition at line 285 of file style.h.

Referenced by SPStop::getOpacity().

◆ stroke

T<SPAttr::STROKE, SPIPaint> SPStyle::stroke

stroke

Definition at line 247 of file style.h.

Referenced by SPHatch::_countHrefs(), SPPattern::_countHrefs(), Inkscape::UI::PathManipulator::_getStrokeTolerance(), Inkscape::Extension::Internal::CairoRenderContext::_setStrokeStyle(), KnotHolder::add_hatch_knotholder(), SPItem::adjust_gradient(), SPItem::adjust_hatch(), SPItem::adjust_pattern(), clear(), convert_stroke_color(), count_gradient_hrefs(), Inkscape::Extension::Internal::PrintEmf::create_pen(), Inkscape::Extension::Internal::PrintWmf::create_pen(), Inkscape::UI::createKnotHolder(), Inkscape::Extension::Internal::Wmf::delete_object(), SPShape::either_bbox(), Inkscape::Extension::Internal::PrintEmf::fill(), Inkscape::Extension::Internal::PrintWmf::fill(), Inkscape::UI::Tools::MeshTool::fit_mesh_in_bbox(), getFillOrStroke(), getGradient(), getStrokePaintServer(), getStrokeURI(), gr_apply_gradient_to_item(), gr_drag_style_query(), gr_get_dt_selected_gradient(), gr_read_selection(), has_stroke(), item_find_paths(), item_to_paths(), Inkscape::LivePathEffect::lpe_shape_convert_stroke_and_fill(), ms_get_dt_selected_gradients(), Inkscape::Extension::Internal::Emf::myEnhMetaFileProc(), Inkscape::NRStyleData::NRStyleData(), objects_query_miterlimit(), objects_query_paintorder(), objects_query_strokecap(), objects_query_strokejoin(), objects_query_strokewidth(), Inkscape::Extension::Internal::Wmf::open(), Inkscape::Extension::Internal::Emf::output_style(), Inkscape::Extension::Internal::Wmf::output_style(), SPShape::print(), Inkscape::Text::Layout::print(), Inkscape::Extension::Internal::OdfOutput::processGradient(), Inkscape::Extension::Internal::OdfOutput::processStyle(), GrDrag::refreshDraggers(), SPObject::release(), Inkscape::Extension::Internal::CairoRenderContext::renderGlyphtext(), Inkscape::Extension::Internal::CairoRenderContext::renderPathVector(), Inkscape::Extension::Internal::Emf::select_extpen(), Inkscape::Extension::Internal::Emf::select_pen(), Inkscape::Extension::Internal::Wmf::select_pen(), Inkscape::Extension::Internal::CairoRenderContext::setStateForStyle(), Inkscape::UI::Widget::StyleSwatch::setStyle(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_flowtext_render(), sp_item_set_gradient(), sp_style_paint_server_ref_modified(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_text_render(), Inkscape::UI::Tools::sp_tweak_color_recursive(), Inkscape::UI::Tools::spdc_apply_style(), SPStyle(), Inkscape::Extension::Internal::PrintLatex::stroke(), stroke_average_width(), Inkscape::ObjectSet::swapFillStroke(), Inkscape::UI::Widget::SelectedStyle::update(), GrDrag::updateDraggers(), Inkscape::UI::Widget::FillNStroke::updateFromPaint(), GrDrag::updateLines(), and ~SPStyle().

◆ stroke_dasharray

◆ stroke_dashoffset

◆ stroke_extensions

◆ stroke_linecap

◆ stroke_linejoin

◆ stroke_miterlimit

◆ stroke_opacity

◆ stroke_ps_changed_connection

sigc::connection SPStyle::stroke_ps_changed_connection

Definition at line 313 of file style.h.

Referenced by clear(), SPIPaint::read(), sp_style_set_ipaint_to_uri(), and ~SPStyle().

◆ stroke_ps_modified_connection

sigc::connection SPStyle::stroke_ps_modified_connection

Definition at line 309 of file style.h.

Referenced by clear(), sp_style_stroke_paint_server_ref_changed(), and ~SPStyle().

◆ stroke_width

T<SPAttr::STROKE_WIDTH, SPILength> SPStyle::stroke_width

stroke-width

Definition at line 249 of file style.h.

Referenced by Inkscape::UI::PathManipulator::_getStrokeTolerance(), Inkscape::Extension::Internal::CairoRenderContext::_setStrokeStyle(), SPItem::adjust_stroke(), SPHatchPath::bounds(), Inkscape::UI::Widget::calcScaleLineWidth(), Inkscape::LivePathEffect::collectPathsAndWidths(), Inkscape::Extension::Internal::PrintEmf::create_pen(), Inkscape::Extension::Internal::PrintWmf::create_pen(), Inkscape::Extension::Internal::Wmf::delete_object(), Inkscape::LivePathEffect::LPEShowHandles::doBeforeEffect(), Inkscape::LivePathEffect::LPEJoinType::doOnApply(), Inkscape::LivePathEffect::LPEPowerStroke::doOnApply(), Inkscape::LivePathEffect::LPETaperStroke::doOnApply(), SPShape::either_bbox(), Inkscape::Extension::Internal::PrintEmf::fill(), Inkscape::Extension::Internal::PrintWmf::fill(), Inkscape::UI::Tools::MarkerTool::get_marker_transform(), Inkscape::UI::Widget::StrokeStyle::getDashFromStyle(), item_find_paths(), item_to_outline(), item_to_paths(), Inkscape::Extension::Internal::Emf::myEnhMetaFileProc(), Inkscape::Extension::Internal::Wmf::myMetaFileProc(), Inkscape::NRStyleData::NRStyleData(), objects_query_strokewidth(), Inkscape::Extension::Internal::Wmf::open(), Inkscape::Extension::Internal::Emf::output_style(), Inkscape::Extension::Internal::Wmf::output_style(), SPShape::print(), Inkscape::Extension::Internal::OdfOutput::processStyle(), Inkscape::Extension::Internal::CairoRenderContext::renderPathVector(), Inkscape::Extension::Internal::Emf::select_extpen(), Inkscape::Extension::Internal::Emf::select_pen(), Inkscape::Extension::Internal::Wmf::select_pen(), Inkscape::UI::Widget::StrokeStyle::setStrokeDash(), Inkscape::UI::Widget::StyleSwatch::setStyle(), sp_get_same_style(), Inkscape::Extension::Internal::sp_shape_render(), sp_shape_update_marker_view(), Inkscape::UI::Tools::spdc_create_single_dot(), SPStyle(), Inkscape::Extension::Internal::PrintLatex::stroke(), stroke_average_width(), Inkscape::UI::Widget::SelectedStyle::update(), SPHatchPath::update(), SPShape::update(), and Inkscape::UI::Widget::StrokeStyle::updateLine().

◆ text_align

◆ text_anchor

◆ text_decoration

T<SPAttr::TEXT_DECORATION, SPITextDecoration> SPStyle::text_decoration

text decoration (css2 16.3.1)

Definition at line 188 of file style.h.

Referenced by Inkscape::NRStyleData::NRStyleData(), and SPStyle().

◆ text_decoration_color

T<SPAttr::TEXT_DECORATION_COLOR, SPIColor> SPStyle::text_decoration_color

Definition at line 193 of file style.h.

Referenced by Inkscape::NRStyleData::NRStyleData(), SPITextDecoration::read(), and SPStyle().

◆ text_decoration_data

SPITextDecorationData SPStyle::text_decoration_data

Definition at line 197 of file style.h.

Referenced by Inkscape::NRStyleData::NRStyleData(), and Inkscape::Text::Layout::show().

◆ text_decoration_fill

T<SPAttr::TEXT_DECORATION_FILL, SPIPaint> SPStyle::text_decoration_fill

Definition at line 194 of file style.h.

◆ text_decoration_line

◆ text_decoration_stroke

T<SPAttr::TEXT_DECORATION_STROKE, SPIPaint> SPStyle::text_decoration_stroke

Definition at line 195 of file style.h.

◆ text_decoration_style

T<SPAttr::TEXT_DECORATION_STYLE, SPITextDecorationStyle> SPStyle::text_decoration_style

Definition at line 192 of file style.h.

Referenced by Inkscape::NRStyleData::NRStyleData(), and SPITextDecoration::read().

◆ text_indent

T<SPAttr::TEXT_INDENT, SPILength> SPStyle::text_indent

First line indent of paragraphs (css2 16.1)

Definition at line 148 of file style.h.

Referenced by SPStyle().

◆ text_orientation

T<SPAttr::TEXT_ORIENTATION, SPIEnum<SPCSSTextOrientation> > SPStyle::text_orientation

Text orientation (CSS Writing Modes 3)

Definition at line 165 of file style.h.

Referenced by objects_query_writing_modes(), and Inkscape::UI::Toolbar::TextToolbar::selection_changed().

◆ text_rendering

T<SPAttr::TEXT_RENDERING, SPIEnum<SPTextRendering> > SPStyle::text_rendering

Definition at line 294 of file style.h.

◆ text_transform

T<SPAttr::TEXT_TRANSFORM, SPIEnum<SPCSSTextTransform> > SPStyle::text_transform

capitalization (css2 16.5)

Definition at line 157 of file style.h.

◆ vector_effect

◆ visibility

T<SPAttr::VISIBILITY, SPIEnum<SPVisibility> > SPStyle::visibility

visibility

Definition at line 213 of file style.h.

◆ white_space

T<SPAttr::WHITE_SPACE, SPIEnum<SPWhiteSpace> > SPStyle::white_space

white space (svg2)

Definition at line 176 of file style.h.

Referenced by SPText::_buildLayoutInit(), SPString::read_content(), and text_flow_into_shape().

◆ word_spacing

◆ writing_mode


The documentation for this class was generated from the following files: