diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-01-18 09:11:04 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-01-18 09:11:04 +0000 |
| commit | f12d6a57fe5cc18be5afd164061578d8e00d75ce (patch) | |
| tree | 7fd1a501a8a545fbf2326ead48cd041928699c5e /src/display/sodipodi-ctrlrect.cpp | |
| parent | update to trunk (diff) | |
| parent | Fix missing embeded image condition, kindly caught by suv in bug #1270334 (diff) | |
| download | inkscape-f12d6a57fe5cc18be5afd164061578d8e00d75ce.tar.gz inkscape-f12d6a57fe5cc18be5afd164061578d8e00d75ce.zip | |
update to trunk
(bzr r11950.1.235)
Diffstat (limited to 'src/display/sodipodi-ctrlrect.cpp')
| -rw-r--r-- | src/display/sodipodi-ctrlrect.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/display/sodipodi-ctrlrect.cpp b/src/display/sodipodi-ctrlrect.cpp index c350e4614..e6e427047 100644 --- a/src/display/sodipodi-ctrlrect.cpp +++ b/src/display/sodipodi-ctrlrect.cpp @@ -142,7 +142,18 @@ void CtrlRect::render(SPCanvasBuf *buf) ink_cairo_set_source_rgba32(buf->ct, _border_color); cairo_stroke(buf->ct); - if (_shadow_size > 0) { + if (_shadow_size == 1) { // highlight the border by drawing it in _shadow_color + if (_dashed) { + cairo_set_dash(buf->ct, dashes, 2, 4); + cairo_rectangle(buf->ct, 0.5 + area[X].min(), 0.5 + area[Y].min(), + area[X].max() - area[X].min(), area[Y].max() - area[Y].min()); + } else { + cairo_rectangle(buf->ct, -0.5 + area[X].min(), -0.5 + area[Y].min(), + area[X].max() - area[X].min(), area[Y].max() - area[Y].min()); + } + ink_cairo_set_source_rgba32(buf->ct, _shadow_color); + cairo_stroke(buf->ct); + } else if (_shadow_size > 1) { // fill the shadow ink_cairo_set_source_rgba32(buf->ct, _shadow_color); cairo_rectangle(buf->ct, 1 + area[X].max(), area[Y].min() + _shadow_size, _shadow_size, area[Y].max() - area[Y].min() + 1); // right shadow |
