Inkscape
Vector Graphics Editor
|
Go to the source code of this file.
Functions | |
static bool | isTextualItem (SPObject const *obj) |
void | sp_desktop_set_color (SPDesktop *desktop, Color const &color, bool is_relative, bool fill) |
Set color on selection on desktop. | |
void | sp_desktop_apply_css_recursive (SPObject *o, SPCSSAttr *css, bool skip_lines) |
Apply style on object and children, recursively. | |
void | sp_desktop_set_style (SPDesktop *desktop, SPCSSAttr *css, bool change, bool write_current, bool switch_style) |
Apply style on selection on desktop. | |
void | sp_desktop_set_style (Inkscape::ObjectSet *set, SPDesktop *desktop, SPCSSAttr *css, bool change, bool write_current, bool switch_style) |
SPCSSAttr * | sp_desktop_get_style (SPDesktop *desktop, bool with_text) |
Return the desktop's current style. | |
std::optional< Color > | sp_desktop_get_color (SPDesktop *desktop, bool is_fill) |
Return the desktop's current color. | |
double | sp_desktop_get_master_opacity_tool (SPDesktop *desktop, Glib::ustring const &tool, bool *has_opacity) |
double | sp_desktop_get_opacity_tool (SPDesktop *desktop, Glib::ustring const &tool, bool is_fill) |
std::optional< Color > | sp_desktop_get_color_tool (SPDesktop *desktop, Glib::ustring const &tool, bool is_fill) |
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_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 desktop style (otherwise). | |
gdouble | stroke_average_width (const std::vector< SPItem * > &objects) |
Determine average stroke width, simple method. | |
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_opacity (const std::vector< SPItem * > &objects, SPStyle *style_res) |
Write to style_res the average opacity 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 | 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_strokecap (const std::vector< SPItem * > &objects, SPStyle *style_res) |
Write to style_res the stroke cap of a list of objects. | |
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_paintorder (const std::vector< SPItem * > &objects, SPStyle *style_res) |
Write to style_res the paint order of a list of objects. | |
int | objects_query_fontnumbers (const std::vector< SPItem * > &objects, SPStyle *style_res) |
Write to style_res the average font size and spacing of objects. | |
int | objects_query_fontstyle (const std::vector< SPItem * > &objects, SPStyle *style_res) |
Write to style_res the average font style of objects. | |
int | objects_query_fontvariants (const std::vector< SPItem * > &objects, SPStyle *style_res) |
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_fontfeaturesettings (const std::vector< SPItem * > &objects, SPStyle *style_res) |
static int | objects_query_baselines (const std::vector< SPItem * > &objects, SPStyle *style_res) |
Write to style_res the baseline numbers. | |
int | objects_query_fontfamily (const std::vector< SPItem * > &objects, SPStyle *style_res) |
Write to style_res the average font family of objects. | |
static int | objects_query_fontspecification (const std::vector< SPItem * > &objects, SPStyle *style_res) |
int | objects_query_blend (const std::vector< SPItem * > &objects, SPStyle *style_res) |
int | objects_query_isolation (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 | 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, return appropriate flag. | |
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, write the result to style, return appropriate flag. | |
|
static |
Definition at line 59 of file desktop-style.cpp.
Referenced by objects_query_baselines(), objects_query_fontfamily(), objects_query_fontfeaturesettings(), objects_query_fontnumbers(), objects_query_fontspecification(), objects_query_fontstyle(), objects_query_fontvariants(), objects_query_writing_modes(), and sp_desktop_set_style().
|
static |
Write to style_res the baseline numbers.
Definition at line 1412 of file desktop-style.cpp.
References SPStyle::baseline_shift, SPIBaselineShift::computed, current, SPIBase::inherit, isTextualItem(), SPIBaselineShift::literal, QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, set, SPIBase::set, SPIBaselineShift::type, and SPIBaselineShift::value.
Referenced by sp_desktop_query_style_from_list().
Definition at line 1598 of file desktop-style.cpp.
References SPStyle::filter, filter_get_legacy_blend(), SPStyle::getFilter(), items, SPStyle::mix_blend_mode, QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, and SP_CSS_BLEND_NORMAL.
Referenced by sp_desktop_query_style_from_list().
Write to style_res the average blurring of a list of objects.
Definition at line 1699 of file desktop-style.cpp.
References SPObject::children, Geom::Affine::descrim(), SPStyle::filter, SPStyle::filter_gaussianBlur_deviation, SPStyle::getFilter(), SPItem::i2dt_affine(), item, items, num, QUERY_STYLE_MULTIPLE_AVERAGED, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, and QUERY_STYLE_SINGLE.
Referenced by sp_desktop_query_style_from_list().
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.
Definition at line 459 of file desktop-style.cpp.
References SPStyle::fill_opacity, SPStyle::fill_rule, SPIPaint::getColor(), SPStyle::getFillOrStroke(), SPStyle::getFillPaintServer(), SPStyle::getFillURI(), SPStyle::getStrokePaintServer(), SPStyle::getStrokeURI(), SPGradient::getVector(), SPIPaint::isColor(), SPIPaint::isPaintserver(), SPIPaint::isSameType(), linear(), SPIPaint::paintOrigin, parent, SPObject::parent, QUERY_STYLE_MULTIPLE_AVERAGED, QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, SPIBase::set, SPIPaint::setColor(), sp_style_set_to_uri(), and SPStyle::stroke_opacity.
Referenced by Inkscape::UI::Dialog::ColorItem::action_edit(), sp_desktop_query_style_from_list(), and Inkscape::UI::Widget::FillNStroke::updateFromPaint().
Write to style_res the average font family of objects.
Definition at line 1506 of file desktop-style.cpp.
References SPStyle::font_family, isTextualItem(), QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, and QUERY_STYLE_SINGLE.
Referenced by sp_desktop_query_style_from_list().
int objects_query_fontfeaturesettings | ( | const std::vector< SPItem * > & | objects, |
SPStyle * | style_res | ||
) |
Definition at line 1362 of file desktop-style.cpp.
References SPStyle::font_feature_settings, isTextualItem(), QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, and QUERY_STYLE_SINGLE.
Referenced by sp_desktop_query_style_from_list().
Write to style_res the average font size and spacing of objects.
Definition at line 964 of file desktop-style.cpp.
References Geom::Affine::descrim(), SPStyle::font_size, SPItem::i2dt_affine(), isTextualItem(), item, SPStyle::letter_spacing, SPStyle::line_height, Inkscape::Text::Layout::LINE_HEIGHT_NORMAL, QUERY_STYLE_MULTIPLE_AVERAGED, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, size, SP_CSS_UNIT_EM, SP_CSS_UNIT_EX, SP_CSS_UNIT_NONE, SP_CSS_UNIT_PERCENT, SP_CSS_UNIT_PX, SP_FONT_SIZE_LENGTH, SPStyle::text_anchor, and SPStyle::word_spacing.
Referenced by Inkscape::UI::Toolbar::TextToolbar::_selectionChanged(), and sp_desktop_query_style_from_list().
|
static |
Definition at line 1551 of file desktop-style.cpp.
References SPStyle::font_specification, isTextualItem(), QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, and QUERY_STYLE_SINGLE.
Referenced by sp_desktop_query_style_from_list().
Write to style_res the average font style of objects.
Definition at line 1158 of file desktop-style.cpp.
References SPStyle::font_size, SPStyle::font_stretch, SPStyle::font_style, SPStyle::font_variant, SPStyle::font_variation_settings, SPStyle::font_weight, isTextualItem(), QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, set, and SPStyle::text_align.
Referenced by sp_desktop_query_style_from_list().
Definition at line 1212 of file desktop-style.cpp.
References SPIEnum< T >::computed, SPStyle::font_variant_caps, SPStyle::font_variant_east_asian, SPStyle::font_variant_ligatures, SPStyle::font_variant_numeric, SPStyle::font_variant_position, isTextualItem(), QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, set, SP_CSS_FONT_VARIANT_CAPS_NORMAL, SP_CSS_FONT_VARIANT_EAST_ASIAN_NORMAL, SP_CSS_FONT_VARIANT_LIGATURES_NORMAL, SP_CSS_FONT_VARIANT_NUMERIC_NORMAL, SP_CSS_FONT_VARIANT_POSITION_NORMAL, and SPIEnum< T >::value.
Referenced by sp_desktop_query_style_from_list().
Definition at line 1649 of file desktop-style.cpp.
References SPStyle::isolation, items, QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, and SP_CSS_ISOLATION_AUTO.
Referenced by sp_desktop_query_style_from_list().
Write to style_res the average miter limit of a list of objects.
Definition at line 749 of file desktop-style.cpp.
References QUERY_STYLE_MULTIPLE_AVERAGED, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, SPStyle::stroke, and SPStyle::stroke_miterlimit.
Referenced by sp_desktop_query_style_from_list().
Write to style_res the average opacity of a list of objects.
Definition at line 617 of file desktop-style.cpp.
References SPStyle::opacity, QUERY_STYLE_MULTIPLE_AVERAGED, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, and QUERY_STYLE_SINGLE.
Referenced by sp_desktop_query_style_from_list().
Write to style_res the paint order of a list of objects.
Definition at line 909 of file desktop-style.cpp.
References SPStyle::paint_order, QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, and SPStyle::stroke.
Referenced by sp_desktop_query_style_from_list().
Write to style_res the stroke cap of a list of objects.
Definition at line 808 of file desktop-style.cpp.
References QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, SP_STROKE_LINECAP_BUTT, SPStyle::stroke, and SPStyle::stroke_linecap.
Referenced by sp_desktop_query_style_from_list().
Write to style_res the stroke join of a list of objects.
Definition at line 858 of file desktop-style.cpp.
References QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, SP_STROKE_LINEJOIN_MITER, SPStyle::stroke, and SPStyle::stroke_linejoin.
Referenced by sp_desktop_query_style_from_list().
Write to style_res the average stroke width of a list of objects.
Definition at line 670 of file desktop-style.cpp.
References Geom::Affine::descrim(), SPItem::i2dt_affine(), item, QUERY_STYLE_MULTIPLE_AVERAGED, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, SPStyle::stroke, SPStyle::stroke_extensions, and SPStyle::stroke_width.
Referenced by sp_desktop_query_style_from_list(), and sp_get_same_style().
Write to style_res the average writing modes style of objects.
Definition at line 1315 of file desktop-style.cpp.
References SPStyle::direction, isTextualItem(), QUERY_STYLE_MULTIPLE_DIFFERENT, QUERY_STYLE_MULTIPLE_SAME, QUERY_STYLE_NOTHING, QUERY_STYLE_SINGLE, set, SPStyle::text_orientation, and SPStyle::writing_mode.
Referenced by sp_desktop_query_style_from_list().
Apply style on object and children, recursively.
Definition at line 95 of file desktop-style.cpp.
References SPObject::changeCSS(), child, SPObject::children, css, Geom::Affine::descrim(), SPObject::getAttribute(), SPItem::i2doc_affine(), item, SPObject::parent, sp_css_attr_scale(), sp_desktop_apply_css_recursive(), sp_repr_css_attr_new(), sp_repr_css_attr_unref(), sp_repr_css_merge(), sp_repr_css_property(), sp_repr_css_set_property(), and SP_TSPAN_ROLE_LINE.
Referenced by Inkscape::ObjectSet::chameleonFill(), Inkscape::LivePathEffect::LPEShowHandles::doOnApply(), Inkscape::LivePathEffect::lpe_shape_convert_stroke_and_fill(), Inkscape::LivePathEffect::lpe_shape_revert_stroke_and_fill(), Inkscape::ObjectSet::removeFilter(), Inkscape::UI::Widget::StrokeStyle::setStrokeDash(), Inkscape::UI::Widget::StrokeStyle::setStrokeMiter(), Inkscape::UI::Widget::StrokeStyle::setStrokeWidth(), sp_desktop_apply_css_recursive(), sp_desktop_set_style(), Inkscape::UI::Tools::sp_spray_recursive(), Inkscape::UI::Tools::spdc_apply_style(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), Inkscape::ObjectSet::swapFillStroke(), and Inkscape::UI::Widget::FillNStroke::updateFromPaint().
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.
Definition at line 368 of file desktop-style.cpp.
References css, desktop, Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), Inkscape::Preferences::getInheritedStyle(), sp_desktop_get_style(), sp_repr_css_attr_unref(), sp_repr_css_set(), and sp_repr_css_unset_property().
Referenced by Inkscape::UI::Tools::EraserTool::_clipErase(), Inkscape::UI::Tools::EraserTool::_doWork(), Inkscape::UI::Tools::ConnectorTool::_flushWhite(), Inkscape::UI::Tools::TextTool::_setupText(), create_flowtext_with_internal_frame(), create_text_with_rectangle(), Inkscape::UI::Tools::do_trace(), Inkscape::UI::Tools::SpiralTool::drag(), Inkscape::UI::Tools::ArcTool::drag(), Inkscape::UI::Tools::RectTool::drag(), Inkscape::UI::Tools::StarTool::drag(), Inkscape::UI::Tools::CalligraphicTool::set_to_accumulated(), Inkscape::UI::Tools::MeasureTool::setLabelText(), Inkscape::UI::Tools::spdc_apply_powerstroke_shape(), Inkscape::UI::Tools::spdc_create_single_dot(), and Inkscape::UI::Tools::spdc_flush_white().
Return the desktop's current color.
Definition at line 273 of file desktop-style.cpp.
References SPDesktop::current, desktop, and sp_repr_css_property().
Referenced by Inkscape::UI::Widget::SelectedStyle::on_fill_lastused(), Inkscape::UI::Widget::SelectedStyle::on_stroke_lastused(), sp_gradient_vector_for_object(), and Inkscape::UI::Widget::FillNStroke::updateFromPaint().
std::optional< Color > sp_desktop_get_color_tool | ( | SPDesktop * | desktop, |
Glib::ustring const & | tool, | ||
bool | is_fill | ||
) |
Definition at line 342 of file desktop-style.cpp.
References Inkscape::GC::anchor(), css, SPDesktop::current, desktop, Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), Inkscape::Preferences::getStyle(), sp_desktop_get_style(), sp_repr_css_attr_unref(), and sp_repr_css_property().
Referenced by Inkscape::UI::Tools::EraserTool::_fitDrawLastPoint(), Inkscape::UI::Tools::CalligraphicTool::fit_and_split(), Inkscape::UI::Tools::ToolBase::get_cursor(), Inkscape::UI::Tools::sp_tweak_dilate(), and Inkscape::UI::Tools::spdc_create_single_dot().
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 desktop style (otherwise).
Definition at line 398 of file desktop-style.cpp.
References desktop, SPStyle::font_size, Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), Inkscape::Preferences::getString(), and SPStyle::mergeString().
Referenced by Inkscape::UI::Tools::TextTool::root_handler().
double sp_desktop_get_master_opacity_tool | ( | SPDesktop * | desktop, |
Glib::ustring const & | tool, | ||
bool * | has_opacity | ||
) |
Definition at line 284 of file desktop-style.cpp.
References css, SPDesktop::current, desktop, Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), Inkscape::Preferences::getStyle(), sp_desktop_get_style(), sp_repr_css_attr_unref(), sp_repr_css_property(), and sp_svg_number_read_f().
Referenced by Inkscape::UI::Tools::EraserTool::_fitDrawLastPoint(), Inkscape::UI::Tools::CalligraphicTool::fit_and_split(), and Inkscape::UI::Tools::sp_tweak_dilate().
double sp_desktop_get_opacity_tool | ( | SPDesktop * | desktop, |
Glib::ustring const & | tool, | ||
bool | is_fill | ||
) |
Definition at line 315 of file desktop-style.cpp.
References css, SPDesktop::current, desktop, Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), Inkscape::Preferences::getStyle(), sp_desktop_get_style(), sp_repr_css_attr_unref(), sp_repr_css_property(), and sp_svg_number_read_f().
Referenced by Inkscape::UI::Tools::EraserTool::_fitDrawLastPoint(), Inkscape::UI::Tools::CalligraphicTool::fit_and_split(), and Inkscape::UI::Tools::ToolBase::get_cursor().
Return the desktop's current style.
Definition at line 253 of file desktop-style.cpp.
References css, SPDesktop::current, desktop, sp_css_attr_unset_text(), sp_repr_css_attr_new(), sp_repr_css_attr_unref(), and sp_repr_css_merge().
Referenced by Inkscape::UI::Toolbar::TextToolbar::_selectionChanged(), SPDesktop::applyCurrentOrToolStyle(), Inkscape::FontLister::selection_update(), sp_desktop_apply_style_tool(), sp_desktop_get_color_tool(), sp_desktop_get_master_opacity_tool(), and sp_desktop_get_opacity_tool().
Query the subselection (if any) or selection on the given desktop for the given property, write the result to style, return appropriate flag.
Definition at line 1832 of file desktop-style.cpp.
References SPDesktop::_query_style_signal, desktop, SPDesktop::getSelection(), QUERY_STYLE_NOTHING, and sp_desktop_query_style_from_list().
Referenced by Inkscape::UI::Toolbar::TextToolbar::_cursorMoved(), Inkscape::UI::Toolbar::TextToolbar::_selectionChanged(), Inkscape::UI::Toolbar::TextToolbar::mergeDefaultStyle(), Inkscape::UI::Dialog::TextEdit::onReadSelection(), Inkscape::UI::Widget::FillNStroke::performUpdate(), Inkscape::UI::Widget::StyleSubject::Selection::queryStyle(), Inkscape::UI::Toolbar::TextToolbar::script_changed(), Inkscape::FontLister::selection_update(), Inkscape::UI::Widget::SelectedStyle::update(), Inkscape::UI::Dialog::SwatchesPanel::update_fillstroke_indicators(), and Inkscape::UI::Widget::StrokeStyle::updateLine().
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, return appropriate flag.
Definition at line 1778 of file desktop-style.cpp.
References objects_query_baselines(), objects_query_blend(), objects_query_blur(), objects_query_fillstroke(), objects_query_fontfamily(), objects_query_fontfeaturesettings(), objects_query_fontnumbers(), objects_query_fontspecification(), objects_query_fontstyle(), objects_query_fontvariants(), objects_query_isolation(), objects_query_miterlimit(), objects_query_opacity(), objects_query_paintorder(), objects_query_strokecap(), objects_query_strokejoin(), objects_query_strokewidth(), objects_query_writing_modes(), QUERY_STYLE_NOTHING, QUERY_STYLE_PROPERTY_BASELINES, QUERY_STYLE_PROPERTY_BLEND, QUERY_STYLE_PROPERTY_BLUR, QUERY_STYLE_PROPERTY_FILL, QUERY_STYLE_PROPERTY_FONT_SPECIFICATION, QUERY_STYLE_PROPERTY_FONTFAMILY, QUERY_STYLE_PROPERTY_FONTFEATURESETTINGS, QUERY_STYLE_PROPERTY_FONTNUMBERS, QUERY_STYLE_PROPERTY_FONTSTYLE, QUERY_STYLE_PROPERTY_FONTVARIANTS, QUERY_STYLE_PROPERTY_ISOLATION, QUERY_STYLE_PROPERTY_MASTEROPACITY, QUERY_STYLE_PROPERTY_PAINTORDER, QUERY_STYLE_PROPERTY_STROKE, QUERY_STYLE_PROPERTY_STROKECAP, QUERY_STYLE_PROPERTY_STROKEJOIN, QUERY_STYLE_PROPERTY_STROKEMITERLIMIT, QUERY_STYLE_PROPERTY_STROKEWIDTH, and QUERY_STYLE_PROPERTY_WRITINGMODES.
Referenced by Inkscape::UI::Tools::TextTool::_styleQueried(), Inkscape::UI::Widget::FillNStroke::performUpdate(), and sp_desktop_query_style().
Set color on selection on desktop.
Definition at line 75 of file desktop-style.cpp.
References css, desktop, sp_desktop_set_style(), sp_repr_css_attr_new(), sp_repr_css_attr_unref(), sp_repr_css_set_property_double(), and sp_repr_css_set_property_string().
Referenced by Inkscape::UI::Widget::FillNStroke::dragFromPaint(), Inkscape::UI::Tools::DropperTool::root_handler(), and Inkscape::UI::Widget::FillNStroke::updateFromPaint().
void sp_desktop_set_style | ( | Inkscape::ObjectSet * | set, |
SPDesktop * | desktop, | ||
SPCSSAttr * | css, | ||
bool | change, | ||
bool | write_current, | ||
bool | switch_style | ||
) |
Definition at line 179 of file desktop-style.cpp.
References SPDesktop::_set_style_signal, css, SPDesktop::current, desktop, Inkscape::Preferences::get(), SPDesktop::getTool(), isTextualItem(), item, Inkscape::Preferences::mergeStyle(), set, sp_css_attr_unset_text(), sp_css_attr_unset_uris(), sp_desktop_apply_css_recursive(), sp_repr_css_attr_new(), sp_repr_css_attr_unref(), sp_repr_css_merge(), sp_repr_css_property_is_unset(), and sp_repr_css_unset_property().
void sp_desktop_set_style | ( | SPDesktop * | desktop, |
SPCSSAttr * | css, | ||
bool | change, | ||
bool | write_current, | ||
bool | switch_style | ||
) |
Apply style on selection on desktop.
Definition at line 173 of file desktop-style.cpp.
References css, desktop, SPDesktop::getSelection(), and sp_desktop_set_style().
Referenced by Inkscape::UI::Tools::EraserTool::_handleStrokeStyle(), Inkscape::UI::Widget::SelectedStyle::_on_paste_callback(), Inkscape::UI::Dialog::TextEdit::apply_changes(), Inkscape::UI::Widget::StrokeStyle::buttonToggledCB(), Inkscape::UI::Widget::RotateableSwatch::color_adjust(), Inkscape::UI::Toolbar::TextToolbar::fontstyle_value_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_value_changed(), Inkscape::UI::Toolbar::TextToolbar::mergeDefaultStyle(), Inkscape::UI::Dialog::ColorItem::on_click(), Inkscape::UI::Widget::SelectedStyle::on_fill_black(), Inkscape::UI::Widget::SelectedStyle::on_fill_invert(), Inkscape::UI::Widget::SelectedStyle::on_fill_lastselected(), Inkscape::UI::Widget::SelectedStyle::on_fill_lastused(), Inkscape::UI::Widget::SelectedStyle::on_fill_opaque(), Inkscape::UI::Widget::SelectedStyle::on_fill_remove(), Inkscape::UI::Widget::SelectedStyle::on_fill_unset(), Inkscape::UI::Widget::SelectedStyle::on_fill_white(), Inkscape::UI::Widget::SelectedStyle::on_opacity_changed(), Inkscape::UI::Widget::SelectedStyle::on_opacity_click(), Inkscape::UI::Widget::SelectedStyle::on_popup_preset(), Inkscape::UI::Widget::SelectedStyle::on_stroke_black(), Inkscape::UI::Widget::SelectedStyle::on_stroke_invert(), Inkscape::UI::Widget::SelectedStyle::on_stroke_lastselected(), Inkscape::UI::Widget::SelectedStyle::on_stroke_lastused(), Inkscape::UI::Widget::SelectedStyle::on_stroke_opaque(), Inkscape::UI::Widget::SelectedStyle::on_stroke_remove(), Inkscape::UI::Widget::SelectedStyle::on_stroke_unset(), Inkscape::UI::Widget::SelectedStyle::on_stroke_white(), Inkscape::ObjectSet::removeFilter(), Inkscape::UI::Toolbar::TextToolbar::script_changed(), Inkscape::UI::Widget::SelectedStyle::SelectedStyle(), Inkscape::UI::Widget::StyleSubject::Selection::setCSS(), Inkscape::UI::Widget::FillNStroke::setFillrule(), Inkscape::UI::Widget::StrokeStyle::setStrokeDash(), Inkscape::UI::Widget::StrokeStyle::setStrokeMiter(), Inkscape::UI::Widget::StrokeStyle::setStrokeWidth(), sp_desktop_set_color(), sp_desktop_set_style(), Inkscape::ObjectSet::swapFillStroke(), Inkscape::UI::Toolbar::TextToolbar::text_outer_set_style(), Inkscape::UI::Widget::StrokeStyle::unitChangedCB(), Inkscape::UI::Widget::FillNStroke::updateFromPaint(), and Inkscape::UI::Widget::RotateableStrokeWidth::value_adjust().
gdouble stroke_average_width | ( | const std::vector< SPItem * > & | objects | ) |
Determine average stroke width, simple method.
Definition at line 421 of file desktop-style.cpp.
References Geom::Affine::descrim(), SPItem::i2dt_affine(), Geom::infinity(), item, SPStyle::stroke, SPStyle::stroke_width, SPObject::style, and width.
Referenced by Inkscape::SelTrans::_updateVolatileState().