55#include <glibmm/i18n.h>
61 return is<SPText>(obj)
62 || is<SPFlowtext>(obj)
65 || is<SPTextPath>(obj)
67 || is<SPFlowpara>(obj)
68 || is<SPFlowtspan>(obj);
79 g_warning(
"FIXME: relative color setting not yet implemented");
98 auto item = cast<SPItem>(o);
111 auto tspan = cast<SPTSpan>(o);
117 || is<SPTextPath>(o))
120 !(is<SPFlowregionbreak>(o) ||
121 is<SPFlowregionExclude>(o) ||
124 (is<SPFlowregion>(o->
parent) ||
125 is<SPFlowregionExclude>(o->
parent)
137 double const ex(local.
descrim());
190 prefs->
mergeStyle(
"/desktop/style", css_write);
191 auto itemlist =
set->items();
192 for (
auto i = itemlist.begin(); i!= itemlist.end(); ++i) {
195 auto side = cast<Box3DSide>(obj);
198 Glib::ustring(
"/desktop/") + side->axes_string() +
"/style", css_write);
220 tool->use_tool_cursor();
229 auto itemlist =
set->items();
230 for (
auto i = itemlist.begin(); i!= itemlist.end(); ++i) {
257 const auto & l =
css->attributeList();
276 is_fill ?
"fill" :
"stroke",
290 *has_opacity =
false;
291 if (prefs->
getBool(tool +
"/usecurrent")) {
320 if (prefs->
getBool(tool +
"/usecurrent")) {
346 bool styleFromCurrent = prefs->
getBool(tool +
"/usecurrent");
347 if (styleFromCurrent) {
354 std::optional<Color> ret;
373 if (prefs->
getBool(tool_path +
"/usecurrent") && css_current) {
399 Glib::ustring desktop_style = prefs->
getString(
"/desktop/style");
400 Glib::ustring style_str;
401 if ((prefs->
getBool(
"/tools/text/usecurrent")) && !desktop_style.empty()) {
402 style_str = desktop_style;
404 style_str = prefs->
getString(
"/tools/text/style");
408 if (!style_str.empty()) {
409 SPStyle style(SP_ACTIVE_DOCUMENT);
423 gdouble avgwidth = 0.0;
424 bool notstroked =
true;
425 int n_notstroked = 0;
426 for (
auto item : objects) {
449 return avgwidth / (objects.size() - n_notstroked);
458 if (objects.empty()) {
464 paint_res->
set =
true;
466 bool paintImpossible =
true;
467 Colors::ColorSet colors;
469 for (
auto obj : objects) {
485 bool paint_effectively_set =
493 if ((!paintImpossible) && (!paint->
isSameType(*paint_res) || (paint_res->
set != paint_effectively_set))) {
503 auto linear_res = cast<SPLinearGradient>(server_res);
504 SPRadialGradient *radial_res = linear_res ? nullptr : cast<SPRadialGradient>(server_res);
505 SPPattern *pattern_res = (linear_res || radial_res) ?
nullptr : cast<SPPattern>(server_res);
507 (linear_res || radial_res || pattern_res) ?
nullptr : cast<SPHatch>(server_res);
510 auto linear = cast<SPLinearGradient>(server);
517 if (vector_res != vector) {
520 }
else if (radial_res) {
521 auto radial = cast<SPRadialGradient>(server);
528 if (vector_res != vector) {
531 }
else if (pattern_res) {
532 auto pattern = cast<SPPattern>(server);
537 auto pat = cast<SPPattern>(server)->rootPattern();
538 auto pat_res = cast<SPPattern>(server_res)->rootPattern();
539 if (pat_res != pat) {
542 }
else if (hatch_res) {
543 auto hatch = cast<SPHatch>(server);
548 auto hat = cast<SPHatch>(server)->rootHatch();
549 auto hat_res = cast<SPHatch>(server_res)->rootHatch();
550 if (hat_res != hat) {
561 if (colors.isEmpty()) {
565 colors.set(obj->getId(), copy);
568 paintImpossible =
false;
577 paint_res->
set = paint_effectively_set;
581 if (paint_res->
set && paint_res->
isColor() && !colors.isEmpty()) {
582 auto color = colors.getAverage();
584 style_res->
fill_opacity.set_double(color.stealOpacity());
590 if (colors.size() > 1) {
601 if (objects.size() > 1) {
614 if (objects.empty()) {
619 gdouble opacity_sum = 0;
620 gdouble opacity_prev = -1;
621 bool same_opacity =
true;
622 guint opacity_items = 0;
625 for (
auto obj : objects) {
634 double opacity = SP_SCALE24_TO_FLOAT(style->
opacity.value);
635 opacity_sum += opacity;
636 if (opacity_prev != -1 && opacity != opacity_prev) {
637 same_opacity =
false;
639 opacity_prev = opacity;
642 if (opacity_items > 1) {
643 opacity_sum /= opacity_items;
646 style_res->
opacity.value = SP_SCALE24_FROM_FLOAT(opacity_sum);
648 if (opacity_items == 0) {
650 }
else if (opacity_items == 1) {
667 if (objects.empty()) {
672 gdouble avgwidth = 0.0;
674 gdouble prev_sw = -1;
681 for (
auto obj : objects) {
694 noneSet &= style->
stroke.isNone();
709 if (!std::isnan(sw)) {
710 if (prev_sw != -1 && fabs(sw - prev_sw) > 1e-3)
722 avgwidth /= (n_stroked);
726 style_res->
stroke.noneSet = noneSet;
728 if (n_stroked == 0) {
730 }
else if (n_stroked == 1) {
746 if (objects.empty()) {
754 gdouble prev_ml = -1;
757 for (
auto obj : objects) {
766 if ( style->
stroke.isNone() ) {
781 avgml /= (n_stroked);
787 if (n_stroked == 0) {
789 }
else if (n_stroked == 1) {
805 if (objects.empty()) {
811 bool same_cap =
true;
814 for (
auto obj : objects) {
823 if ( style->
stroke.isNone() ) {
837 if (n_stroked == 0) {
839 }
else if (n_stroked == 1) {
855 if (objects.empty()) {
861 bool same_join =
true;
864 for (
auto obj : objects) {
873 if ( style->
stroke.isNone() ) {
888 if (n_stroked == 0) {
890 }
else if (n_stroked == 1) {
906 if (objects.empty()) {
911 std::string prev_order;
912 bool same_order =
true;
915 for (
auto obj : objects) {
924 if ( style->
stroke.isNone() ) {
931 if (!prev_order.empty() && prev_order.compare( style->
paint_order.value ) != 0) {
940 style_res->
paint_order.value= g_strdup( prev_order.c_str() );
945 }
else if (n_order == 1) {
961 bool different =
false;
962 bool different_lineheight =
false;
963 bool different_lineheight_unit =
false;
966 double letterspacing = 0;
967 double wordspacing = 0;
968 double lineheight = 0;
969 bool letterspacing_normal =
false;
970 bool wordspacing_normal =
false;
971 bool lineheight_normal =
false;
972 bool lineheight_unit_proportional =
false;
973 bool lineheight_unit_absolute =
false;
974 bool lineheight_set =
false;
976 double size_prev = 0;
977 double letterspacing_prev = 0;
978 double wordspacing_prev = 0;
979 double lineheight_prev = 0;
980 int lineheight_unit_prev = -1;
985 for (
auto obj : objects) {
997 g_assert(
item !=
nullptr);
1003 double dummy = style->
font_size.computed * doc_scale;
1004 if (!std::isnan(dummy)) {
1011 if (!different && (letterspacing_prev == 0 || letterspacing_prev == letterspacing)) {
1012 letterspacing_normal =
true;
1016 letterspacing_normal =
false;
1020 if (!different && (wordspacing_prev == 0 || wordspacing_prev == wordspacing)) {
1021 wordspacing_normal =
true;
1024 wordspacing += style->
word_spacing.computed * doc_scale;
1025 wordspacing_normal =
false;
1032 double lineheight_current;
1033 int lineheight_unit_current;
1037 if (!different_lineheight &&
1038 (lineheight_prev == 0 || lineheight_prev == lineheight_current))
1039 lineheight_normal =
true;
1046 lineheight_unit_current = style->
line_height.unit;
1047 lineheight_unit_proportional =
true;
1048 lineheight_normal =
false;
1049 lineheight += lineheight_current;
1053 lineheight_unit_current = style->
line_height.unit;
1054 lineheight_unit_absolute =
true;
1055 lineheight_normal =
false;
1056 lineheight += lineheight_current * doc_scale;
1059 lineheight_set =
true;
1062 if ((size_prev != 0 && style->
font_size.computed != size_prev) ||
1063 (letterspacing_prev != 0 && style->
letter_spacing.computed != letterspacing_prev) ||
1064 (wordspacing_prev != 0 && style->
word_spacing.computed != wordspacing_prev)) {
1068 if (lineheight_prev != 0 && lineheight_current != lineheight_prev) {
1069 different_lineheight =
true;
1072 if (lineheight_unit_prev != -1 && lineheight_unit_current != lineheight_unit_prev) {
1073 different_lineheight_unit =
true;
1079 lineheight_prev = lineheight_current;
1080 lineheight_unit_prev = lineheight_unit_current;
1090 if (texts - no_size > 0) {
1091 size /= (texts - no_size);
1093 letterspacing /= texts;
1094 wordspacing /= texts;
1095 lineheight /= texts;
1107 style_res->
line_height.normal = lineheight_normal;
1110 if (different_lineheight_unit) {
1111 if (lineheight_unit_absolute && !lineheight_unit_proportional) {
1118 if (lineheight_unit_absolute && lineheight_unit_proportional) {
1125 if (lineheight_unit_prev != -1) {
1126 style_res->
line_height.unit = lineheight_unit_prev;
1139 if (different || different_lineheight) {
1155 bool different =
false;
1160 for (
auto obj : objects) {
1192 if (texts == 0 || !
set)
1225 ligatures_res->
value = 0;
1226 int position_value = 0;
1228 numeric_res->
value = 0;
1229 asian_res->
value = 0;
1231 for (
auto obj : objects) {
1256 position_value |= (position_computed ^ position_in->computed);
1257 position_computed &= position_in->computed;
1259 caps_value |= (caps_computed ^ caps_in->computed);
1260 caps_computed &= caps_in->computed;
1270 position_computed = position_in->computed;
1271 caps_computed = caps_in->computed;
1286 position_value != 0 ||
1291 if (texts == 0 || !
set)
1312 bool different =
false;
1317 for (
auto obj : objects) {
1342 if (texts == 0 || !
set)
1359 bool different =
false;
1364 for (
auto obj : objects) {
1409 bool different =
false;
1426 for (
auto obj : objects) {
1471 if (different || !
set ) {
1483 if (texts == 0 || !
set)
1503 bool different =
false;
1508 for (
auto obj : objects) {
1548 bool different =
false;
1553 for (
auto obj : objects) {
1596 auto blend_prev = blend;
1597 bool same_blend =
true;
1600 for (
auto obj : objects) {
1605 if (!style || !obj) {
1623 if (
items > 1 && blend_prev != blend)
1634 }
else if (
items == 1) {
1647 auto isolation_prev = isolation;
1648 bool same_isolation =
true;
1651 for (
auto obj : objects) {
1656 if (!style || !obj) {
1669 if (
items > 1 && isolation_prev != isolation)
1670 same_isolation =
false;
1671 isolation_prev = isolation;
1680 }
else if (
items == 1) {
1696 if (objects.empty()) {
1702 float blur_prev = -1;
1703 bool same_blur =
true;
1704 guint blur_items = 0;
1707 for (
auto obj : objects) {
1728 auto primitive = cast<SPFilterPrimitive>(&primitive_obj);
1732 auto spblur = cast<SPGaussianBlur>(primitive);
1734 float num = spblur->get_std_deviation().getNumber();
1736 if (!std::isnan(dummy)) {
1738 if (blur_prev != -1 && fabs (
num - blur_prev) > 1e-2)
1752 blur_sum /= blur_items;
1758 }
else if (
items == 1) {
1837 std::vector<SPItem *> vec(selection->items().begin(), selection->items().end());
TODO: insert short description here.
3x3 matrix representing an affine transformation.
Coord descrim() const
Calculate the descriminant.
Preference storage class.
bool getBool(Glib::ustring const &pref_path, bool def=false)
Retrieve a Boolean value.
Glib::ustring getString(Glib::ustring const &pref_path, Glib::ustring const &def="")
Retrieve an UTF-8 string.
static Preferences * get()
Access the singleton Preferences object.
SPCSSAttr * getStyle(Glib::ustring const &pref_path)
Retrieve a CSS style.
SPCSSAttr * getInheritedStyle(Glib::ustring const &pref_path)
Retrieve an inherited CSS style.
void mergeStyle(Glib::ustring const &pref_path, SPCSSAttr *style)
Merge a CSS style with the current preference value.
static const double LINE_HEIGHT_NORMAL
The CSS spec allows line-height:normal to be whatever the user agent thinks will look good.
Interface for refcounted XML nodes.
To do: update description of desktop.
SPCSSAttr * current
Current style.
Inkscape::Selection * getSelection() const
Inkscape::UI::Tools::ToolBase * getTool() const
sigc::signal< bool(SPCSSAttr const *, bool)>::accumulated< StopOnTrue > _set_style_signal
sigc::signal< int(SPStyle *, int)>::accumulated< StopOnNonZero > _query_style_signal
SPGradient * getVector(bool force_private=false)
Returns private vector of given gradient (the gradient at the end of the href chain which has stops),...
Baseline shift type internal to SPStyle. (This is actually just like SPIFontSize)
Paint type internal to SPStyle.
bool isPaintserver() const
bool isSameType(SPIPaint const &other) const
SPPaintOrigin paintOrigin
void setColor(Colors::Color const &other)
Colors::Color const & getColor() const
Base class for visual SVG elements.
Geom::Affine i2dt_affine() const
Returns the transformation from item to desktop coords.
Geom::Affine i2doc_affine() const
Returns the accumulated transformation of the item and all its ancestors, including root's viewport.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
void changeCSS(SPCSSAttr *css, char const *attr)
SPStyle * style
Represents the style properties, whether from presentation attributes, the style attribute,...
char const * getAttribute(char const *name) const
T< SPAttr::FONT_VARIANT_EAST_ASIAN, SPIEastAsian > font_variant_east_asian
Font variant East Asian.
T< SPAttr::FONT_WEIGHT, SPIEnum< SPCSSFontWeight > > font_weight
Weight of the font.
SPPaintServer * getFillPaintServer()
T< SPAttr::STROKE, SPIPaint > stroke
stroke
T< SPAttr::LINE_HEIGHT, SPILengthOrNormal > line_height
Line height (css2 10.8.1)
Inkscape::URI const * getStrokeURI() const
SPPaintServer * getStrokePaintServer()
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)
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::STROKE_WIDTH, SPILength > stroke_width
stroke-width
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::FONT_VARIANT, SPIEnum< SPCSSFontVariant > > font_variant
Which substyle of the font (CSS 2.
T< SPAttr::STROKE_LINEJOIN, SPIEnum< SPStrokeJoinType > > stroke_linejoin
stroke-linejoin
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)
T< SPAttr::STROKE_OPACITY, SPIScale24 > stroke_opacity
stroke-opacity
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::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::FONT_VARIANT_NUMERIC, SPINumeric > font_variant_numeric
Font variant numeric (numerical formatting)
T< SPAttr::TEXT_ANCHOR, SPIEnum< SPTextAnchor > > text_anchor
Anchor of the text (svg1.1 10.9.1)
T< SPAttr::ISOLATION, SPIEnum< SPIsolation > > isolation
mix-blend-mode: CSS Compositing and Blending Level 1
Inkscape::URI const * getFillURI() const
T< SPAttr::FONT_VARIANT_CAPS, SPIEnum< SPCSSFontVariantCaps > > font_variant_caps
Font variant caps (small caps)
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::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::TEXT_ORIENTATION, SPIEnum< SPCSSTextOrientation > > text_orientation
Text orientation (CSS Writing Modes 3)
T< SPAttr::FONT_SIZE, SPIFontSize > font_size
Size of the font.
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.
T< SPAttr::FONT_VARIATION_SETTINGS, SPIFontVariationSettings > font_variation_settings
Font variation settings (Low level access to OpenType variable font design-coordinate values)
T< SPAttr::BASELINE_SHIFT, SPIBaselineShift > baseline_shift
Baseline shift (svg1.1 10.9.2)
A set of colors which can be modified together used for color pickers.
TODO: insert short description here.
std::shared_ptr< Css const > css
double sp_desktop_get_font_size_tool(SPDesktop *desktop)
Returns the font size (in SVG pixels) of the text tool style (if text tool uses its own style) or des...
int objects_query_writing_modes(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the average writing modes style of objects.
int objects_query_blend(const std::vector< SPItem * > &objects, SPStyle *style_res)
int objects_query_blur(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the average blurring of a list of objects.
int objects_query_strokewidth(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the average stroke width of a list of objects.
int sp_desktop_query_style_from_list(const std::vector< SPItem * > &list, SPStyle *style, int property)
Query the given list of objects for the given property, write the result to style,...
void sp_desktop_apply_style_tool(SPDesktop *desktop, Inkscape::XML::Node *repr, Glib::ustring const &tool_path, bool with_text)
Apply the desktop's current style or the tool style to repr.
double sp_desktop_get_master_opacity_tool(SPDesktop *desktop, Glib::ustring const &tool, bool *has_opacity)
std::optional< Color > sp_desktop_get_color(SPDesktop *desktop, bool is_fill)
Return the desktop's current color.
std::optional< Color > sp_desktop_get_color_tool(SPDesktop *desktop, Glib::ustring const &tool, bool is_fill)
double sp_desktop_get_opacity_tool(SPDesktop *desktop, Glib::ustring const &tool, bool is_fill)
int objects_query_opacity(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the average opacity of a list of objects.
void sp_desktop_apply_css_recursive(SPObject *o, SPCSSAttr *css, bool skip_lines)
Apply style on object and children, recursively.
int objects_query_strokejoin(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the stroke join of a list of objects.
int objects_query_fontvariants(const std::vector< SPItem * > &objects, SPStyle *style_res)
gdouble stroke_average_width(const std::vector< SPItem * > &objects)
Determine average stroke width, simple method.
int objects_query_paintorder(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the paint order of a list of objects.
void sp_desktop_set_style(SPDesktop *desktop, SPCSSAttr *css, bool change, bool write_current, bool switch_style)
Apply style on selection on desktop.
int objects_query_fontnumbers(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the average font size and spacing of objects.
SPCSSAttr * sp_desktop_get_style(SPDesktop *desktop, bool with_text)
Return the desktop's current style.
int objects_query_isolation(const std::vector< SPItem * > &objects, SPStyle *style_res)
int objects_query_fontfamily(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the average font family of objects.
int objects_query_strokecap(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the stroke cap of a list of objects.
int sp_desktop_query_style(SPDesktop *desktop, SPStyle *style, int property)
Query the subselection (if any) or selection on the given desktop for the given property,...
static int objects_query_fontspecification(const std::vector< SPItem * > &objects, SPStyle *style_res)
int objects_query_fillstroke(const std::vector< SPItem * > &objects, SPStyle *style_res, bool const isfill)
Write to style_res the average fill or stroke of list of objects, if applicable.
static int objects_query_baselines(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the baseline numbers.
static bool isTextualItem(SPObject const *obj)
int objects_query_miterlimit(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the average miter limit of a list of objects.
int objects_query_fontfeaturesettings(const std::vector< SPItem * > &objects, SPStyle *style_res)
void sp_desktop_set_color(SPDesktop *desktop, Color const &color, bool is_relative, bool fill)
Set color on selection on desktop.
int objects_query_fontstyle(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the average font style of objects.
@ QUERY_STYLE_PROPERTY_STROKE
@ QUERY_STYLE_PROPERTY_BLEND
@ QUERY_STYLE_PROPERTY_STROKEWIDTH
@ QUERY_STYLE_PROPERTY_FONTNUMBERS
@ QUERY_STYLE_PROPERTY_FONT_SPECIFICATION
@ QUERY_STYLE_PROPERTY_BASELINES
@ QUERY_STYLE_PROPERTY_FONTFEATURESETTINGS
@ QUERY_STYLE_PROPERTY_ISOLATION
@ QUERY_STYLE_PROPERTY_FONTSTYLE
@ QUERY_STYLE_PROPERTY_BLUR
@ QUERY_STYLE_PROPERTY_FONTFAMILY
@ QUERY_STYLE_PROPERTY_STROKEMITERLIMIT
@ QUERY_STYLE_PROPERTY_PAINTORDER
@ QUERY_STYLE_PROPERTY_FILL
@ QUERY_STYLE_PROPERTY_FONTVARIANTS
@ QUERY_STYLE_PROPERTY_STROKEJOIN
@ QUERY_STYLE_PROPERTY_MASTEROPACITY
@ QUERY_STYLE_PROPERTY_STROKECAP
@ QUERY_STYLE_PROPERTY_WRITINGMODES
@ QUERY_STYLE_MULTIPLE_DIFFERENT
@ QUERY_STYLE_MULTIPLE_AVERAGED
@ QUERY_STYLE_MULTIPLE_SAME
Editable view implementation.
static char const *const current
static char const *const parent
SPBlendMode filter_get_legacy_blend(SPObject *item)
Get if the filter have a < 1.0 blending filter @params: the item to get filtered blend.
SVG Gaussian blur filter effect.
constexpr Coord infinity()
Get a value representing infinity.
Interface for locally managing a current status message.
Raw stack of active status messages.
static R & anchor(R &r)
Increments the reference count of a anchored object.
SPCSSAttr * sp_repr_css_attr_new()
Creates an empty SPCSSAttr (a class for manipulating CSS style properties).
void sp_repr_css_merge(SPCSSAttr *dst, SPCSSAttr *src)
Merges two SPCSSAttr's.
void sp_repr_css_set(Node *repr, SPCSSAttr *css, gchar const *attr)
Sets an attribute (e.g.
void sp_repr_css_set_property_double(SPCSSAttr *css, gchar const *name, double value)
Set a style property to a new float value (e.g.
void sp_repr_css_attr_unref(SPCSSAttr *css)
Unreferences an SPCSSAttr (will be garbage collected if no references remain).
void sp_repr_css_set_property_string(SPCSSAttr *css, char const *name, std::string const &value)
Set a style property to a standard string.
char const * sp_repr_css_property(SPCSSAttr *css, gchar const *name, gchar const *defval)
Returns a character string of the value of a given style property or a default value if the attribute...
void sp_repr_css_unset_property(SPCSSAttr *css, gchar const *name)
Set a style property to "inkscape:unset".
bool sp_repr_css_property_is_unset(SPCSSAttr *css, gchar const *name)
Returns true if a style property is present and its value is unset.
void sp_repr_css_set_property(SPCSSAttr *css, gchar const *name, gchar const *value)
Set a style property to a new value (e.g.
Linear linear(double ax, double b)
SPCSSAttr - interface for CSS Attributes.
TODO: insert short description here.
TODO: insert short description here.
TODO: insert short description here.
SVG <hatch> implementation.
TODO: insert short description here.
SVG <pattern> implementation.
TODO: insert short description here.
TODO: insert short description here.
SVG <tref> implementation, see sp-tref.cpp.
TODO: insert short description here.
@ SP_CSS_FONT_VARIANT_LIGATURES_NORMAL
@ SP_CSS_FONT_VARIANT_NUMERIC_NORMAL
@ SP_STROKE_LINEJOIN_MITER
@ SP_CSS_FONT_VARIANT_CAPS_NORMAL
@ SP_CSS_FONT_VARIANT_EAST_ASIAN_NORMAL
@ SP_CSS_FONT_VARIANT_POSITION_NORMAL
SPCSSAttr * sp_css_attr_unset_text(SPCSSAttr *css)
Unset any text-related properties.
SPCSSAttr * sp_css_attr_scale(SPCSSAttr *css, double ex)
Scale any properties that may hold <length> by ex.
void sp_style_set_to_uri(SPStyle *style, bool isfill, Inkscape::URI const *uri)
SPCSSAttr * sp_css_attr_unset_uris(SPCSSAttr *css)
Unset any properties that contain URI values.
SPStyle - a style object for SPItem objects.
unsigned int sp_svg_number_read_f(gchar const *str, float *val)