2#ifndef SEEN_SP_DESKTOP_STYLE_H
3#define SEEN_SP_DESKTOP_STYLE_H
38namespace Glib {
class ustring; }
Interface for refcounted XML nodes.
To do: update description of desktop.
Base class for visual SVG elements.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
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_blend(const std::vector< SPItem * > &objects, SPStyle *style_res)
void sp_desktop_set_style(Inkscape::ObjectSet *set, SPDesktop *desktop, SPCSSAttr *css, bool change=true, bool write_current=true, bool switch_style=false)
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,...
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.
@ 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_EVERYTHING
@ QUERY_STYLE_PROPERTY_FILL
@ QUERY_STYLE_PROPERTY_STROKESTYLE
@ QUERY_STYLE_PROPERTY_FONTVARIANTS
@ QUERY_STYLE_PROPERTY_STROKEJOIN
@ QUERY_STYLE_PROPERTY_MASTEROPACITY
@ QUERY_STYLE_PROPERTY_STROKECAP
@ QUERY_STYLE_PROPERTY_WRITINGMODES
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.
@ QUERY_STYLE_MULTIPLE_DIFFERENT
@ QUERY_STYLE_MULTIPLE_AVERAGED
@ QUERY_STYLE_MULTIPLE_SAME
double sp_desktop_get_master_opacity_tool(SPDesktop *desktop, Glib::ustring const &tool, bool *has_opacity=nullptr)
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_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,...
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.
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.
void sp_desktop_set_color(SPDesktop *desktop, Color const &color, bool is_relative, bool fill)
void sp_desktop_apply_style_tool(SPDesktop *desktop, Inkscape::XML::Node *repr, Glib::ustring const &tool, bool with_text)
Apply the desktop's current style or the tool style to repr.
int objects_query_fontstyle(const std::vector< SPItem * > &objects, SPStyle *style_res)
Write to style_res the average font style of objects.
Helper class to stream background task notifications as a series of messages.