summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-08-29 20:39:07 +0000
committerjabiertxof <info@marker.es>2016-08-29 20:39:07 +0000
commit1b8b972f1e0d6ee32c1f85514ec334c654d1e29c (patch)
tree49e23896ee567d33e7c5dcaf31ecb7402cf80673 /src
parentFix a bug in pattern along path at first edit node after applied. Backport it... (diff)
downloadinkscape-1b8b972f1e0d6ee32c1f85514ec334c654d1e29c.tar.gz
inkscape-1b8b972f1e0d6ee32c1f85514ec334c654d1e29c.zip
Partial fix for bug 172063 while we find a better solution for XOR in helper lines
(bzr r15090)
Diffstat (limited to 'src')
-rw-r--r--src/display/canvas-bpath.cpp34
-rw-r--r--src/display/canvas-bpath.h6
-rw-r--r--src/display/sp-ctrlline.cpp2
-rw-r--r--src/ui/control-manager.cpp8
-rw-r--r--src/ui/tools/calligraphic-tool.cpp8
-rw-r--r--src/ui/tools/connector-tool.cpp6
-rw-r--r--src/ui/tools/eraser-tool.cpp6
-rw-r--r--src/ui/tools/node-tool.cpp15
-rw-r--r--src/ui/tools/node-tool.h1
-rw-r--r--src/ui/tools/pen-tool.cpp22
-rw-r--r--src/ui/tools/pencil-tool.cpp2
11 files changed, 56 insertions, 54 deletions
diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp
index 46b59d25a..fd10a96f5 100644
--- a/src/display/canvas-bpath.cpp
+++ b/src/display/canvas-bpath.cpp
@@ -53,6 +53,7 @@ sp_canvas_bpath_init (SPCanvasBPath * bpath)
bpath->stroke_linejoin = SP_STROKE_LINEJOIN_MITER;
bpath->stroke_linecap = SP_STROKE_LINECAP_BUTT;
bpath->stroke_miterlimit = 11.0;
+ bpath->phantom_line = false;
}
static void sp_canvas_bpath_destroy(SPCanvasItem *object)
@@ -71,7 +72,7 @@ static void sp_canvas_bpath_update(SPCanvasItem *item, Geom::Affine const &affin
{
SPCanvasBPath *cbp = SP_CANVAS_BPATH(item);
- item->canvas->requestRedraw((int)item->x1, (int)item->y1, (int)item->x2, (int)item->y2);
+ item->canvas->requestRedraw((int)item->x1 - 1, (int)item->y1 - 1, (int)item->x2 + 1 , (int)item->y2 + 1);
if (reinterpret_cast<SPCanvasItemClass *>(sp_canvas_bpath_parent_class)->update) {
reinterpret_cast<SPCanvasItemClass *>(sp_canvas_bpath_parent_class)->update(item, affine, flags);
@@ -86,10 +87,10 @@ static void sp_canvas_bpath_update(SPCanvasItem *item, Geom::Affine const &affin
Geom::OptRect bbox = bounds_exact_transformed(cbp->curve->get_pathvector(), affine);
if (bbox) {
- item->x1 = (int)bbox->min()[Geom::X] - 1;
- item->y1 = (int)bbox->min()[Geom::Y] - 1;
- item->x2 = (int)bbox->max()[Geom::X] + 1;
- item->y2 = (int)bbox->max()[Geom::Y] + 1;
+ item->x1 = (int)floor(bbox->min()[Geom::X]) - 1;
+ item->y1 = (int)floor(bbox->min()[Geom::Y]) - 1;
+ item->x2 = (int)ceil(bbox->max()[Geom::X]) + 1;
+ item->y2 = (int)ceil(bbox->max()[Geom::Y]) + 1;
} else {
item->x1 = 0;
item->y1 = 0;
@@ -131,7 +132,21 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf)
cairo_fill_preserve(buf->ct);
}
- if (dostroke) {
+ if (dostroke && cbp->phantom_line) {
+ ink_cairo_set_source_rgba32(buf->ct, 0xffffff7f);
+ cairo_set_line_width(buf->ct, 2);
+ if (cbp->dashes[0] != 0 && cbp->dashes[1] != 0) {
+ cairo_set_dash (buf->ct, cbp->dashes, 2, 0);
+ }
+ cairo_stroke(buf->ct);
+ cairo_set_tolerance(buf->ct, 0.5);
+ cairo_new_path(buf->ct);
+ feed_pathvector_to_cairo (buf->ct, cbp->curve->get_pathvector(), cbp->affine, area,
+ /* optimized_stroke = */ !dofill, 1);
+ ink_cairo_set_source_rgba32(buf->ct, cbp->stroke_rgba);
+ cairo_set_line_width(buf->ct, 1);
+ cairo_stroke(buf->ct);
+ } else if (dostroke) {
ink_cairo_set_source_rgba32(buf->ct, cbp->stroke_rgba);
cairo_set_line_width(buf->ct, 1);
if (cbp->dashes[0] != 0 && cbp->dashes[1] != 0) {
@@ -167,24 +182,25 @@ sp_canvas_bpath_point (SPCanvasItem *item, Geom::Point p, SPCanvasItem **actual_
}
SPCanvasItem *
-sp_canvas_bpath_new (SPCanvasGroup *parent, SPCurve *curve)
+sp_canvas_bpath_new (SPCanvasGroup *parent, SPCurve *curve, bool phantom_line)
{
g_return_val_if_fail (parent != NULL, NULL);
g_return_val_if_fail (SP_IS_CANVAS_GROUP (parent), NULL);
SPCanvasItem *item = sp_canvas_item_new (parent, SP_TYPE_CANVAS_BPATH, NULL);
- sp_canvas_bpath_set_bpath (SP_CANVAS_BPATH (item), curve);
+ sp_canvas_bpath_set_bpath (SP_CANVAS_BPATH (item), curve, phantom_line);
return item;
}
void
-sp_canvas_bpath_set_bpath (SPCanvasBPath *cbp, SPCurve *curve)
+sp_canvas_bpath_set_bpath (SPCanvasBPath *cbp, SPCurve *curve, bool phantom_line)
{
g_return_if_fail (cbp != NULL);
g_return_if_fail (SP_IS_CANVAS_BPATH (cbp));
+ cbp->phantom_line = phantom_line;
if (cbp->curve) {
cbp->curve = cbp->curve->unref();
}
diff --git a/src/display/canvas-bpath.h b/src/display/canvas-bpath.h
index 72eca6eeb..686eb7c5a 100644
--- a/src/display/canvas-bpath.h
+++ b/src/display/canvas-bpath.h
@@ -80,7 +80,7 @@ struct SPCanvasBPath {
SPStrokeJoinType stroke_linejoin;
SPStrokeCapType stroke_linecap;
gdouble stroke_miterlimit;
-
+ bool phantom_line;
/* State */
Shape *fill_shp;
Shape *stroke_shp;
@@ -92,9 +92,9 @@ struct SPCanvasBPathClass {
GType sp_canvas_bpath_get_type (void);
-SPCanvasItem *sp_canvas_bpath_new (SPCanvasGroup *parent, SPCurve *curve);
+SPCanvasItem *sp_canvas_bpath_new (SPCanvasGroup *parent, SPCurve *curve, bool phantom_line = false);
-void sp_canvas_bpath_set_bpath (SPCanvasBPath *cbp, SPCurve *curve);
+void sp_canvas_bpath_set_bpath (SPCanvasBPath *cbp, SPCurve *curve, bool phantom_line = false);
void sp_canvas_bpath_set_fill (SPCanvasBPath *cbp, guint32 rgba, SPWindRule rule);
void sp_canvas_bpath_set_stroke (SPCanvasBPath *cbp, guint32 rgba, gdouble width, SPStrokeJoinType join, SPStrokeCapType cap, double dash=0, double gap=0);
diff --git a/src/display/sp-ctrlline.cpp b/src/display/sp-ctrlline.cpp
index 1bde540c0..6c5674935 100644
--- a/src/display/sp-ctrlline.cpp
+++ b/src/display/sp-ctrlline.cpp
@@ -84,7 +84,7 @@ void sp_ctrlline_render(SPCanvasItem *item, SPCanvasBuf *buf)
Geom::Point s = cl->s * cl->affine;
Geom::Point e = cl->e * cl->affine;
- ink_cairo_set_source_rgba32(buf->ct, 0xffffffbf);
+ ink_cairo_set_source_rgba32(buf->ct, 0xffffff7f);
cairo_set_line_width(buf->ct, 2);
cairo_new_path(buf->ct);
diff --git a/src/ui/control-manager.cpp b/src/ui/control-manager.cpp
index 973625574..d0285e467 100644
--- a/src/ui/control-manager.cpp
+++ b/src/ui/control-manager.cpp
@@ -148,7 +148,7 @@ ControlManagerImpl::ControlManagerImpl(ControlManager &manager) :
_ctrlToShape[CTRL_TYPE_NODE_AUTO] = SP_CTRL_SHAPE_CIRCLE;
_ctrlToShape[CTRL_TYPE_NODE_SYMETRICAL] = SP_CTRL_SHAPE_SQUARE;
- _ctrlToShape[CTRL_TYPE_ADJ_HANDLE] = SP_CTRL_SHAPE_CIRCLE;
+ _ctrlToShape[CTRL_TYPE_ADJ_HANDLE] =SP_CTRL_SHAPE_CIRCLE;
_ctrlToShape[CTRL_TYPE_INVISIPOINT] = SP_CTRL_SHAPE_SQUARE;
// -------
@@ -222,10 +222,10 @@ SPCanvasItem *ControlManagerImpl::createControl(SPCanvasGroup *parent, ControlTy
{
case CTRL_TYPE_ADJ_HANDLE:
item = sp_canvas_item_new(parent, SP_TYPE_CTRL,
- "shape", SP_CTRL_SHAPE_CIRCLE,
+ "shape",SP_CTRL_SHAPE_CIRCLE,
"size", targetSize,
- "filled", 0,
- "fill_color", 0xff00007f,
+ "filled", 1,
+ "fill_color", 0xffffff7f,
"stroked", 1,
"stroke_color", 0x0000ff7f,
NULL);
diff --git a/src/ui/tools/calligraphic-tool.cpp b/src/ui/tools/calligraphic-tool.cpp
index d623035d9..9b4dbb1a2 100644
--- a/src/ui/tools/calligraphic-tool.cpp
+++ b/src/ui/tools/calligraphic-tool.cpp
@@ -135,7 +135,7 @@ void CalligraphicTool::setup() {
SPCurve *c = new SPCurve(path);
- this->hatch_area = sp_canvas_bpath_new(this->desktop->getControls(), c);
+ this->hatch_area = sp_canvas_bpath_new(this->desktop->getControls(), c, true);
c->unref();
@@ -1090,7 +1090,7 @@ void CalligraphicTool::fit_and_split(bool release) {
add_cap(this->currentcurve, b2[0], b1[0], this->cap_rounding);
}
this->currentcurve->closepath();
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve, true);
}
/* Current calligraphic */
@@ -1126,7 +1126,7 @@ void CalligraphicTool::fit_and_split(bool release) {
SP_TYPE_CANVAS_BPATH,
NULL);
SPCurve *curve = this->currentcurve->copy();
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH (cbp), curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH (cbp), curve, true);
curve->unref();
guint32 fillColor = sp_desktop_get_color_tool (desktop, "/tools/calligraphic", true);
@@ -1170,7 +1170,7 @@ void CalligraphicTool::draw_temporary_box() {
}
this->currentcurve->closepath();
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve, true);
}
}
diff --git a/src/ui/tools/connector-tool.cpp b/src/ui/tools/connector-tool.cpp
index 84f7f318c..7e6fb4b72 100644
--- a/src/ui/tools/connector-tool.cpp
+++ b/src/ui/tools/connector-tool.cpp
@@ -620,7 +620,7 @@ bool ConnectorTool::_handleMotionNotify(GdkEventMotion const &mevent) {
this->red_curve = path->get_curve_for_edit();
this->red_curve->transform(i2d);
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve, true);
ret = true;
break;
}
@@ -811,7 +811,7 @@ void ConnectorTool::_setSubsequentPoint(Geom::Point const p) {
// Recreate curve from libavoid route.
recreateCurve( this->red_curve, this->newConnRef, this->curvature );
this->red_curve->transform(desktop->doc2dt());
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve, true);
}
@@ -1035,7 +1035,7 @@ endpt_handler(SPKnot */*knot*/, GdkEvent *event, ConnectorTool *cc)
cc->red_curve = SP_PATH(cc->clickeditem)->get_curve_for_edit();
Geom::Affine i2d = (cc->clickeditem)->i2dt_affine();
cc->red_curve->transform(i2d);
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(cc->red_bpath), cc->red_curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(cc->red_bpath), cc->red_curve, true);
cc->clickeditem->setHidden(true);
diff --git a/src/ui/tools/eraser-tool.cpp b/src/ui/tools/eraser-tool.cpp
index d18db8266..4b40262cd 100644
--- a/src/ui/tools/eraser-tool.cpp
+++ b/src/ui/tools/eraser-tool.cpp
@@ -943,7 +943,7 @@ void EraserTool::fit_and_split(bool release) {
}
this->currentcurve->closepath();
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve, true);
}
/* Current eraser */
@@ -980,7 +980,7 @@ void EraserTool::fit_and_split(bool release) {
SPCanvasItem *cbp = sp_canvas_item_new(desktop->getSketch(), SP_TYPE_CANVAS_BPATH, NULL);
SPCurve *curve = this->currentcurve->copy();
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH (cbp), curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH (cbp), curve, true);
curve->unref();
guint32 fillColor = sp_desktop_get_color_tool (desktop, "/tools/eraser", true);
@@ -1029,7 +1029,7 @@ void EraserTool::draw_temporary_box() {
}
this->currentcurve->closepath();
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->currentshape), this->currentcurve, true);
}
}
diff --git a/src/ui/tools/node-tool.cpp b/src/ui/tools/node-tool.cpp
index c266db05c..b4fc569bb 100644
--- a/src/ui/tools/node-tool.cpp
+++ b/src/ui/tools/node-tool.cpp
@@ -158,9 +158,6 @@ NodeTool::~NodeTool() {
if (this->helperpath_tmpitem) {
this->desktop->remove_temporary_canvasitem(this->helperpath_tmpitem);
}
- if (this->helperpath_tmpitem_highlight) {
- this->desktop->remove_temporary_canvasitem(this->helperpath_tmpitem_highlight);
- }
this->_selection_changed_connection.disconnect();
//this->_selection_modified_connection.disconnect();
this->_mouseover_changed_connection.disconnect();
@@ -241,7 +238,6 @@ void NodeTool::setup() {
);
this->helperpath_tmpitem = NULL;
- this->helperpath_tmpitem_highlight = NULL;
this->cursor_drag = false;
this->show_transform_handles = true;
this->single_node_transform_handles = false;
@@ -285,10 +281,6 @@ void NodeTool::update_helperpath () {
this->desktop->remove_temporary_canvasitem(this->helperpath_tmpitem);
this->helperpath_tmpitem = NULL;
}
- if (this->helperpath_tmpitem_highlight) {
- this->desktop->remove_temporary_canvasitem(this->helperpath_tmpitem_highlight);
- this->helperpath_tmpitem_highlight = NULL;
- }
if (SP_IS_LPE_ITEM(selection->singleItem())) {
Inkscape::LivePathEffect::Effect *lpe = SP_LPE_ITEM(selection->singleItem())->getCurrentLPE();
@@ -312,12 +304,7 @@ void NodeTool::update_helperpath () {
cc->reset();
}
if (!c->is_empty()) {
- SPCanvasItem *helperpath_highlight = sp_canvas_bpath_new(this->desktop->getTempGroup(), c);
- sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(helperpath_highlight), 0xffffff9A, 2.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
- sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(helperpath_highlight), 0, SP_WIND_RULE_NONZERO);
- sp_canvas_item_affine_absolute(helperpath_highlight, selection->singleItem()->i2dt_affine());
- this->helperpath_tmpitem_highlight = this->desktop->add_temporary_canvasitem(helperpath_highlight, 0);
- SPCanvasItem *helperpath = sp_canvas_bpath_new(this->desktop->getTempGroup(), c);
+ SPCanvasItem *helperpath = sp_canvas_bpath_new(this->desktop->getTempGroup(), c, true);
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(helperpath), 0x0000ff9A, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(helperpath), 0, SP_WIND_RULE_NONZERO);
sp_canvas_item_affine_absolute(helperpath, selection->singleItem()->i2dt_affine());
diff --git a/src/ui/tools/node-tool.h b/src/ui/tools/node-tool.h
index bebb26dfc..8342d66a6 100644
--- a/src/ui/tools/node-tool.h
+++ b/src/ui/tools/node-tool.h
@@ -69,7 +69,6 @@ private:
SPItem *flashed_item;
Inkscape::Display::TemporaryItem *helperpath_tmpitem;
- Inkscape::Display::TemporaryItem *helperpath_tmpitem_highlight;
Inkscape::Display::TemporaryItem *flash_tempitem;
Inkscape::UI::Selector* _selector;
Inkscape::UI::PathSharedData* _path_data;
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp
index 49f28ad2c..b7579b1fb 100644
--- a/src/ui/tools/pen-tool.cpp
+++ b/src/ui/tools/pen-tool.cpp
@@ -865,7 +865,7 @@ void PenTool::_redrawAll() {
this->green_bpaths = g_slist_remove(this->green_bpaths, this->green_bpaths->data);
}
// one canvas bpath for all of green_curve
- SPCanvasItem *canvas_shape = sp_canvas_bpath_new(this->desktop->getSketch(), this->green_curve);
+ SPCanvasItem *canvas_shape = sp_canvas_bpath_new(this->desktop->getSketch(), this->green_curve, true);
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(canvas_shape), this->green_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(canvas_shape), 0, SP_WIND_RULE_NONZERO);
@@ -877,7 +877,7 @@ void PenTool::_redrawAll() {
this->red_curve->reset();
this->red_curve->moveto(this->p[0]);
this->red_curve->curveto(this->p[1], this->p[2], this->p[3]);
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve, true);
// handles
// hide the handlers in bspline and spiro modes
@@ -1251,10 +1251,10 @@ bool PenTool::_handleKeyPress(GdkEvent *event) {
void PenTool::_resetColors() {
// Red
this->red_curve->reset();
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), NULL);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), NULL, true);
// Blue
this->blue_curve->reset();
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->blue_bpath), NULL);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->blue_bpath), NULL, true);
// Green
while (this->green_bpaths) {
sp_canvas_item_destroy(SP_CANVAS_ITEM(this->green_bpaths->data));
@@ -1277,7 +1277,7 @@ void PenTool::_setInitialPoint(Geom::Point const p) {
this->p[0] = p;
this->p[1] = p;
this->npoints = 2;
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), NULL);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), NULL, true);
this->desktop->canvas->forceFullRedrawAfterInterruptions(5);
}
@@ -1343,7 +1343,7 @@ void PenTool::_bsplineSpiroColor()
this->green_bpaths = g_slist_remove(this->green_bpaths, this->green_bpaths->data);
}
// one canvas bpath for all of green_curve
- SPCanvasItem *canvas_shape = sp_canvas_bpath_new(this->desktop->getSketch(), this->green_curve);
+ SPCanvasItem *canvas_shape = sp_canvas_bpath_new(this->desktop->getSketch(), this->green_curve, true);
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(canvas_shape), this->green_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
sp_canvas_bpath_set_fill(SP_CANVAS_BPATH(canvas_shape), 0, SP_WIND_RULE_NONZERO);
this->green_bpaths = g_slist_prepend(this->green_bpaths, canvas_shape);
@@ -1701,7 +1701,7 @@ void PenTool::_bsplineSpiroBuild()
}else{
this->red_curve->curveto(this->p[1],this->p[2],this->p[3]);
}
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve, true);
curve->append_continuous(this->red_curve, 0.0625);
}
@@ -1722,7 +1722,7 @@ void PenTool::_bsplineSpiroBuild()
LivePathEffect::sp_spiro_do_effect(curve);
}
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->blue_bpath), curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->blue_bpath), curve, true);
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(this->blue_bpath), this->blue_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
sp_canvas_item_show(this->blue_bpath);
curve->unref();
@@ -1778,7 +1778,7 @@ void PenTool::_setSubsequentPoint(Geom::Point const p, bool statusbar, guint sta
}
}
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve, true);
if (statusbar) {
gchar *message = is_curve ?
@@ -1818,7 +1818,7 @@ void PenTool::_setCtrl(Geom::Point const p, guint const state) {
this->red_curve->reset();
this->red_curve->moveto(this->p[0]);
this->red_curve->curveto(this->p[1], this->p[2], this->p[3]);
- sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve);
+ sp_canvas_bpath_set_bpath(SP_CANVAS_BPATH(this->red_bpath), this->red_curve, true);
}
SP_CTRL(this->c0)->moveto(this->p[2]);
this->cl0 ->setCoords(this->p[3], this->p[2]);
@@ -1850,7 +1850,7 @@ void PenTool::_finishSegment(Geom::Point const p, guint const state) {
SPCurve *curve = this->red_curve->copy();
/// \todo fixme:
- SPCanvasItem *canvas_shape = sp_canvas_bpath_new(this->desktop->getSketch(), curve);
+ SPCanvasItem *canvas_shape = sp_canvas_bpath_new(this->desktop->getSketch(), curve, true);
curve->unref();
sp_canvas_bpath_set_stroke(SP_CANVAS_BPATH(canvas_shape), this->green_color, 1.0, SP_STROKE_LINEJOIN_MITER, SP_STROKE_LINECAP_BUTT);
diff --git a/src/ui/tools/pencil-tool.cpp b/src/ui/tools/pencil-tool.cpp
index 7cc695040..9e8005be8 100644
--- a/src/ui/tools/pencil-tool.cpp
+++ b/src/ui/tools/pencil-tool.cpp
@@ -847,7 +847,7 @@ void PencilTool::_fitAndSplit() {
SPCurve *curve = this->red_curve->copy();
/// \todo fixme:
- SPCanvasItem *cshape = sp_canvas_bpath_new(this->desktop->getSketch(), curve);
+ SPCanvasItem *cshape = sp_canvas_bpath_new(this->desktop->getSketch(), curve, true);
curve->unref();
this->highlight_color = SP_ITEM(this->desktop->currentLayer())->highlight_color();