summaryrefslogtreecommitdiffstats
path: root/src/draw-context.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2012-01-17 23:10:09 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2012-01-17 23:10:09 +0000
commit2712075b28e39dbc34d05c3053b7a5430e8b74a5 (patch)
tree04007a2f754bb2de6d3ac7e3dc264ac7c2b35960 /src/draw-context.cpp
parentpowerstroke: add new linecap type to have zero width at path start/end (diff)
downloadinkscape-2712075b28e39dbc34d05c3053b7a5430e8b74a5.tar.gz
inkscape-2712075b28e39dbc34d05c3053b7a5430e8b74a5.zip
improve the powerstroke settings in drawing tool. triangle in and out now use the zerowidth line cap style, such that the zero width knot does not block that path's knot
(bzr r10902)
Diffstat (limited to 'src/draw-context.cpp')
-rw-r--r--src/draw-context.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index 083587625..f3023cfa1 100644
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
@@ -8,6 +8,7 @@
* Copyright (C) 2000 Lauris Kaplinski
* Copyright (C) 2000-2001 Ximian, Inc.
* Copyright (C) 2002 Lauris Kaplinski
+ * Copyright (C) 2012 Johan Engelen
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
@@ -295,8 +296,8 @@ spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points, SPDrawCont
static_cast<LPEPowerStroke*>(lpe)->offset_points.param_set_and_write_new_value(points);
// write powerstroke parameters:
- lpe->getRepr()->setAttribute("start_linecap_type", "butt");
- lpe->getRepr()->setAttribute("end_linecap_type", "butt");
+ lpe->getRepr()->setAttribute("start_linecap_type", "zerowidth");
+ lpe->getRepr()->setAttribute("end_linecap_type", "zerowidth");
lpe->getRepr()->setAttribute("cusp_linecap_type", "round");
lpe->getRepr()->setAttribute("sort_points", "false");
lpe->getRepr()->setAttribute("interpolator_type", "CubicBezierJohan");
@@ -334,9 +335,9 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item, SPCurve *c
{
// "triangle in"
guint curve_length = curve->get_segment_count();
- std::vector<Geom::Point> points(2);
+ std::vector<Geom::Point> points(1);
points[0] = Geom::Point(0., SHAPE_HEIGHT/2);
- points[1] = Geom::Point((double)curve_length, 0.);
+ // points[1] = Geom::Point((double)curve_length, 0.);
spdc_apply_powerstroke_shape(points, dc, item);
shape_applied = true;
@@ -346,9 +347,9 @@ spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item, SPCurve *c
{
// "triangle out"
guint curve_length = curve->get_segment_count();
- std::vector<Geom::Point> points(2);
- points[0] = Geom::Point(0., 0.);
- points[1] = Geom::Point((double)curve_length, SHAPE_HEIGHT/2);
+ std::vector<Geom::Point> points(1);
+ // points[0] = Geom::Point(0., 0.);
+ points[0] = Geom::Point((double)curve_length, SHAPE_HEIGHT/2);
spdc_apply_powerstroke_shape(points, dc, item);
shape_applied = true;