summaryrefslogtreecommitdiffstats
path: root/src/splivarot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/splivarot.cpp')
-rw-r--r--src/splivarot.cpp36
1 files changed, 3 insertions, 33 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index f9aaab898..18308be29 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1568,48 +1568,18 @@ void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool
Inkscape::XML::Node *parent = item->getRepr()->parent();
float o_width = 0;
- JoinType o_join = join_straight;
- ButtType o_butt = butt_straight;
- float o_miter = 0;
{
SPStyle *i_style = item->style;
- int jointype = i_style->stroke_linejoin.value;
- int captype = i_style->stroke_linecap.value;
o_width = i_style->stroke_width.computed;
- if (jointype == SP_STROKE_LINEJOIN_MITER)
- {
- o_join = join_pointy;
- }
- else if (jointype == SP_STROKE_LINEJOIN_ROUND)
- {
- o_join = join_round;
- }
- else
- {
- o_join = join_straight;
- }
- if (captype == SP_STROKE_LINECAP_SQUARE)
- {
- o_butt = butt_square;
- }
- else if (captype == SP_STROKE_LINECAP_ROUND)
- {
- o_butt = butt_round;
- }
- else
- {
- o_butt = butt_straight;
- }
-
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
o_width = prefs->getDouble("/options/defaultoffsetwidth/value", 1.0, "px");
}
- if (o_width < 0.01)
+ if (o_width < 0.01){
o_width = 0.01;
- o_miter = i_style->stroke_miterlimit.value * o_width;
+ }
}
Path *orig = Path_for_item(item, true, false);
@@ -1707,7 +1677,7 @@ void sp_selected_path_create_offset_object(SPDesktop *desktop, int expand, bool
// move to the saved position
repr->setPosition(pos > 0 ? pos : 0);
- SPItem *nitem = (SPItem *) sp_desktop_document(desktop)->getObjectByRepr(repr);
+ SPItem *nitem = reinterpret_cast<SPItem *>(sp_desktop_document(desktop)->getObjectByRepr(repr));
if ( !updating ) {
// delete original, apply the transform to the offset