diff options
| author | Alvin Penner <penner@vaxxine.com> | 2014-01-15 19:22:31 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2014-01-15 19:22:31 +0000 |
| commit | 82f4d9a7537fdb3267bf5570cd34aef0692b0f9f (patch) | |
| tree | 1778d65fa9efb8369968e611e48cbcfad2ac79e9 /src/display | |
| parent | Revert r12544. Fixes bug 1256449 (Clipping missing on Cairo-based exports). N... (diff) | |
| download | inkscape-82f4d9a7537fdb3267bf5570cd34aef0692b0f9f.tar.gz inkscape-82f4d9a7537fdb3267bf5570cd34aef0692b0f9f.zip | |
for rubberband outline, add shading instead of XOR (Bug 1266308)
Fixed bugs:
- https://launchpad.net/bugs/1266308
(bzr r12936)
Diffstat (limited to 'src/display')
| -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 |
