diff options
| author | root <root@jtx.marker.es> | 2013-04-14 21:08:45 +0000 |
|---|---|---|
| committer | root <root@jtx.marker.es> | 2013-04-14 21:08:45 +0000 |
| commit | 224bac8cddd8960f65cf08202c4f40e74c8fc1ae (patch) | |
| tree | 3c841d0754517a3de6829702b581bd90f31919ba /src/display/canvas-bpath.cpp | |
| parent | halo (diff) | |
| download | inkscape-224bac8cddd8960f65cf08202c4f40e74c8fc1ae.tar.gz inkscape-224bac8cddd8960f65cf08202c4f40e74c8fc1ae.zip | |
Go back
(bzr r11950.1.93)
Diffstat (limited to 'src/display/canvas-bpath.cpp')
| -rw-r--r-- | src/display/canvas-bpath.cpp | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp index defd95b45..8faf8947f 100644 --- a/src/display/canvas-bpath.cpp +++ b/src/display/canvas-bpath.cpp @@ -147,6 +147,9 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf) 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); if (dofill) { // RGB / BGR ink_cairo_set_source_rgba32(buf->ct, cbp->fill_rgba); @@ -156,37 +159,12 @@ sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf) } if (dostroke) { - SPCurve* orig = new SPCurve(cbp->curve->get_pathvector()); - Geom::Point origPoint(orig->first_path()->initialPoint()); - if(cbp->stroke_rgba == 0x12345678){ - cairo_save(buf->ct); - orig->moveto(origPoint[Geom::X]+1,origPoint[Geom::Y]+1); - feed_pathvector_to_cairo (buf->ct, cbp->curve->get_pathvector(), cbp->affine, area, - /* optimized_stroke = */ !dofill, 1); - ink_cairo_set_source_rgba32(buf->ct, 0x00000020); - cairo_set_line_width(buf->ct, 1); - cairo_move_to(buf->ct, origPoint[Geom::X] + 1, origPoint[Geom::Y] + 1); - cairo_stroke_preserve(buf->ct); - cairo_restore(buf->ct); - cairo_save(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, 0xffffff20); - cairo_set_line_width(buf->ct, 1); - cairo_move_to(buf->ct, origPoint[Geom::X] - 1, origPoint[Geom::Y] - 1); - cairo_stroke_preserve(buf->ct); - cairo_restore(buf->ct); - }else{ - 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_move_to(buf->ct, origPoint[Geom::X], origPoint[Geom::Y]); - if (cbp->dashes[0] != 0 && cbp->dashes[1] != 0) { - cairo_set_dash (buf->ct, cbp->dashes, 2, 0); - } - cairo_stroke(buf->ct); + 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) { + cairo_set_dash (buf->ct, cbp->dashes, 2, 0); } + cairo_stroke(buf->ct); } else { cairo_new_path(buf->ct); } |
