summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-04-15 22:44:13 +0000
committerJabiertxo Arraiza Zenotz <jtx@jtx.marker.es>2013-04-15 22:44:13 +0000
commit25ea29de646f639eb445a8dbef533ed3d1c35b14 (patch)
tree01a7bdcd7d70f6926c530a3f3dc75591e6790271 /src
parentGo back (diff)
downloadinkscape-25ea29de646f639eb445a8dbef533ed3d1c35b14.tar.gz
inkscape-25ea29de646f639eb445a8dbef533ed3d1c35b14.zip
adding composite
(bzr r11950.1.94)
Diffstat (limited to 'src')
-rw-r--r--src/display/canvas-bpath.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp
index 8faf8947f..9135774c1 100644
--- a/src/display/canvas-bpath.cpp
+++ b/src/display/canvas-bpath.cpp
@@ -133,7 +133,9 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf)
SPCanvasBPath *cbp = SP_CANVAS_BPATH (item);
Geom::Rect area = buf->rect;
-
+ double width = 0.5;
+ Geom::Rect viewbox = item->canvas->getViewbox();
+ viewbox.expandBy (width);
if ( !cbp->curve ||
((cbp->stroke_rgba & 0xff) == 0 && (cbp->fill_rgba & 0xff) == 0 ) ||
cbp->curve->get_segment_count() < 1)
@@ -144,7 +146,14 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf)
bool dofill = ((cbp->fill_rgba & 0xff) != 0);
bool dostroke = ((cbp->stroke_rgba & 0xff) != 0);
-
+
+ if (dostroke) {
+ const cairo_rectangle_int_t *rectangle = new cairo_rectangle_int_t {viewbox.left(),viewbox.top(),viewbox.width(),viewbox.height()};
+ cairo_region_create_rectangle(rectangle);
+ cairo_paint(buf->ct);
+ cairo_set_operator(buf->ct,CAIRO_OPERATOR_OVERLAY);
+ }
+
cairo_set_tolerance(buf->ct, 0.5);
cairo_new_path(buf->ct);
@@ -165,6 +174,7 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf)
cairo_set_dash (buf->ct, cbp->dashes, 2, 0);
}
cairo_stroke(buf->ct);
+ cairo_destroy(buf->ct);
} else {
cairo_new_path(buf->ct);
}