diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-06-22 21:45:17 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-06-22 21:45:17 +0000 |
| commit | 1496385d1be9d733b06e0cd94839e2ef32c959bc (patch) | |
| tree | 0b30c7b9f9d719a4e5d2814b308e543cf23e66aa /src/display/sodipodi-ctrl.cpp | |
| parent | Initial Cairo rendering commit: solid shapes, gradients, opacity and patterns (diff) | |
| download | inkscape-1496385d1be9d733b06e0cd94839e2ef32c959bc.tar.gz inkscape-1496385d1be9d733b06e0cd94839e2ef32c959bc.zip | |
Fix cross control point
(bzr r9508.1.2)
Diffstat (limited to 'src/display/sodipodi-ctrl.cpp')
| -rw-r--r-- | src/display/sodipodi-ctrl.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/display/sodipodi-ctrl.cpp b/src/display/sodipodi-ctrl.cpp index c85fb586b..dc79f5969 100644 --- a/src/display/sodipodi-ctrl.cpp +++ b/src/display/sodipodi-ctrl.cpp @@ -337,7 +337,6 @@ sp_ctrl_build_cache (SPCtrl *ctrl) ctrl->cache = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h); cairo_t *cr = cairo_create(ctrl->cache); - bool supress_fill = false; bool supress_paint = false; switch (ctrl->shape) { @@ -362,15 +361,13 @@ sp_ctrl_build_cache (SPCtrl *ctrl) break; case SP_CTRL_SHAPE_CROSS: - cairo_move_to(cr, 0.5+c, 0); // top stroke - cairo_line_to(cr, 0.5+c, c); - cairo_move_to(cr, w, 0.5+c); // right stroke - cairo_line_to(cr, w, c+1); - cairo_move_to(cr, 0.5+c, h); // bottom stroke - cairo_line_to(cr, 0.5+c, c+1); - cairo_move_to(cr, 0, 0.5+c); // left stroke - cairo_line_to(cr, c, 0.5+c); - supress_fill = true; + cairo_move_to(cr, 0.5, 0.5); + cairo_line_to(cr, -0.5+w, -0.5+h); + cairo_move_to(cr, -0.5+w, 0.5); // right stroke + cairo_line_to(cr, 0.5, -0.5+h); + cairo_set_line_width(cr, 1); + cairo_stroke(cr); + supress_paint = true; ctrl->build = TRUE; break; @@ -425,7 +422,7 @@ sp_ctrl_build_cache (SPCtrl *ctrl) } if (ctrl->build && !supress_paint) { - if (ctrl->filled && !supress_fill) { + if (ctrl->filled) { ink_cairo_set_source_rgba32(cr, ctrl->fill_color); cairo_fill_preserve(cr); } |
