/* Authors:
*
* Liam P White
*
* Copyright (C) 2014 Authors
*
* Released under GNU GPL v2+, read the file 'COPYING' for more information
*/
#include "live_effects/parameter/enum.h"
#include "helper/geom-pathstroke.h"
#include "sp-shape.h"
#include "style.h"
#include "sp-paint-server.h"
#include "svg/svg-color.h"
#include "desktop-style.h"
#include "svg/css-ostringstream.h"
#include "lpe-jointype.h"
namespace Inkscape {
namespace LivePathEffect {
};
//{BUTT_LEANED, N_("Leaned"), "leaned"}
};
static const Util::EnumDataConverter<unsigned> CapTypeConverter(CapTypeData, sizeof(CapTypeData)/sizeof(*CapTypeData));
static const Util::EnumDataConverter<unsigned> JoinTypeConverter(JoinTypeData, sizeof(JoinTypeData)/sizeof(*JoinTypeData));
linecap_type(_("Line cap"), _("The end shape of the stroke"), "linecap_type", CapTypeConverter, &wr, this, butt_straight),
linejoin_type(_("Join:"), _("Determines the shape of the path's corners"), "linejoin_type", JoinTypeConverter, &wr, this, JOIN_EXTRAPOLATE),
//start_lean(_("Start path lean"), _("Start path lean"), "start_lean", &wr, this, 0.),
//end_lean(_("End path lean"), _("End path lean"), "end_lean", &wr, this, 0.),
miter_limit(_("Miter limit:"), _("Maximum length of the miter join (in units of stroke width)"), "miter_limit", &wr, this, 100.),
attempt_force_join(_("Force miter"), _("Overrides the miter limit and forces a join."), "attempt_force_join", &wr, this, true)
{
show_orig_path = true;
//registerParameter(&start_lean);
//registerParameter(&end_lean);
//start_lean.param_set_range(-1,1);
//start_lean.param_set_increments(0.1, 0.1);
//start_lean.param_set_digits(4);
//end_lean.param_set_range(-1,1);
//end_lean.param_set_increments(0.1, 0.1);
//end_lean.param_set_digits(4);
}
{
}
//from LPEPowerStroke -- sets fill if stroke color because we will
//be converting to a fill to make the new join.
{
if (SP_IS_SHAPE(lpeitem)) {
if (server) {
str += "url(#";
str += ")";
}
gchar c[64];
sp_svg_write_color (c, sizeof(c), lpeitem->style->stroke.value.color.toRGBA32(SP_SCALE24_TO_FLOAT(lpeitem->style->stroke_opacity.value)));
} else {
}
}
}
//from LPEPowerStroke -- sets stroke color from existing fill color
{
if (SP_IS_SHAPE(lpeitem)) {
if (server) {
str += "url(#";
str += ")";
}
gchar c[64];
sp_svg_write_color (c, sizeof(c), lpeitem->style->fill.value.color.toRGBA32(SP_SCALE24_TO_FLOAT(lpeitem->style->fill_opacity.value)));
} else {
}
item->updateRepr();
}
}
{
}
return ret;
}
} // namespace LivePathEffect
} // namespace Inkscape
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8 :