13#include <glibmm/i18n.h>
27namespace LivePathEffect {
55 line_width(_(
"Line width"), _(
"Thickness of the stroke"),
"line_width", &wr, this, 1.),
60 miter_limit(_(
"Miter limit:"), _(
"Maximum length of the miter join (in units of stroke width)"),
"miter_limit", &wr, this, 100.),
61 attempt_force_join(_(
"Force miter"), _(
"Overrides the miter limit and forces a join."),
"attempt_force_join", &wr, this, true)
83 if (!is<SPShape>(lpeitem)) {
88 auto lpeitem_mutable =
const_cast<SPLPEItem *
>(lpeitem);
89 auto item = cast<SPShape>(lpeitem_mutable);
94 Glib::ustring pref_path = (Glib::ustring)
"/live_effects/" +
97 (Glib::ustring)
"line_width";
111 bool transform_stroke = prefs ? prefs->
getBool(
"/options/transform/stroke",
true) :
true;
112 if (transform_stroke) {
121 auto lpeitem_mutable =
const_cast<SPLPEItem *
>(lpeitem);
122 auto shape = cast<SPShape>(lpeitem_mutable);
131 for (
const auto & i : path_in) {
3x3 matrix representing an affine transformation.
iterator insert(iterator pos, Path const &p)
void registerParameter(Parameter *param)
EffectType effectType() const
void transform_multiply(Geom::Affine const &postmul, bool set) override
Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.
Geom::PathVector doEffect_path(Geom::PathVector const &path_in) override
EnumParam< unsigned > linejoin_type
void doOnApply(SPLPEItem const *lpeitem) override
Is performed a single time when the effect is freshly applied to a path.
LPEJoinType(LivePathEffectObject *lpeobject)
EnumParam< unsigned > linecap_type
BoolParam attempt_force_join
void doOnRemove(SPLPEItem const *lpeitem) override
void param_transform_multiply(Geom::Affine const &postmul, bool set) override
void param_set_value(double val)
bool isValidDouble() const
Check if the preference value can be interpreted as a floating point value.
Preference storage class.
bool getBool(Glib::ustring const &pref_path, bool def=false)
Retrieve a Boolean value.
static Preferences * get()
Access the singleton Preferences object.
Entry const getEntry(Glib::ustring const &pref_path)
Retrieve a preference entry without specifying its type.
Simplified management of enumerations of svg items with UI labels.
SPStyle * style
Represents the style properties, whether from presentation attributes, the style attribute,...
T< SPAttr::STROKE_WIDTH, SPILength > stroke_width
stroke-width
Fill/stroke conversion routines for LPEs which draw a stroke.
void lpe_shape_convert_stroke_and_fill(SPShape *shape)
Prepares a SPShape's fill and stroke for use in a path effect by setting the existing stroke properti...
void lpe_shape_revert_stroke_and_fill(SPShape *shape, double width)
Applies the fill of the SPShape to its stroke, sets the stroke width to the provided parameter,...
static const Util::EnumData< unsigned > CapTypeData[]
static const Util::EnumDataConverter< unsigned > JoinTypeConverter(JoinTypeData, sizeof(JoinTypeData)/sizeof(*JoinTypeData))
const EnumEffectDataConverter< EffectType > LPETypeConverter
defined in effect.cpp
static const Util::EnumData< unsigned > JoinTypeData[]
static const Util::EnumDataConverter< unsigned > CapTypeConverter(CapTypeData, sizeof(CapTypeData)/sizeof(*CapTypeData))
Helper class to stream background task notifications as a series of messages.
Geom::PathVector outline(Geom::Path const &input, double width, double miter, LineJoinType join, LineCapType butt, double tolerance)
Strokes the path given by input.
Singleton class to access the preferences file in a convenient way.
Simplified management of enumerations of svg items with UI labels.
SPStyle - a style object for SPItem objects.