diff options
| author | Andrew Higginson <at.higginson@gmail.com> | 2011-12-27 21:04:47 +0000 |
|---|---|---|
| committer | Andrew <at.higginson@gmail.com> | 2011-12-27 21:04:47 +0000 |
| commit | 80960b623a99aae1402ab651b2974ef544ed3b03 (patch) | |
| tree | ba49d42c2789e9e11f805e2d5263e10f9fedeef8 /src/display/sp-canvas-util.cpp | |
| parent | try to fix bug (diff) | |
| parent | GDL: Cherry-pick upstream patch 73852 (2011-03-23) - Add missing return value. (diff) | |
| download | inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.tar.gz inkscape-80960b623a99aae1402ab651b2974ef544ed3b03.zip | |
merged with trunk so I can build again...
(bzr r10092.1.36)
Diffstat (limited to 'src/display/sp-canvas-util.cpp')
| -rw-r--r-- | src/display/sp-canvas-util.cpp | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/src/display/sp-canvas-util.cpp b/src/display/sp-canvas-util.cpp index 7eac32e2d..78936009b 100644 --- a/src/display/sp-canvas-util.cpp +++ b/src/display/sp-canvas-util.cpp @@ -13,12 +13,10 @@ */ -#include <string.h> // for memset #include <2geom/affine.h> -#include "libnr/nr-pixops.h" -#include "sp-canvas-item.h" #include "sp-canvas-util.h" - +#include "sp-canvas-item.h" +#include "sp-canvas.h" void sp_canvas_update_bbox (SPCanvasItem *item, int x1, int y1, int x2, int y2) @@ -40,41 +38,8 @@ sp_canvas_item_reset_bounds (SPCanvasItem *item) item->y2 = 0.0; } -void -sp_canvas_prepare_buffer (SPCanvasBuf *buf) +void sp_canvas_prepare_buffer(SPCanvasBuf *) { - if (buf->is_empty) { - sp_canvas_clear_buffer(buf); - buf->is_empty = false; - } -} - -void -sp_canvas_clear_buffer (SPCanvasBuf *buf) -{ - unsigned char r, g, b; - - r = (buf->bg_color >> 16) & 0xff; - g = (buf->bg_color >> 8) & 0xff; - b = buf->bg_color & 0xff; - - if ((r != g) || (r != b)) { - int x, y; - for (y = buf->rect.y0; y < buf->rect.y1; y++) { - unsigned char *p; - p = buf->buf + (y - buf->rect.y0) * buf->buf_rowstride; - for (x = buf->rect.x0; x < buf->rect.x1; x++) { - *p++ = r; - *p++ = g; - *p++ = b; - } - } - } else { - int y; - for (y = buf->rect.y0; y < buf->rect.y1; y++) { - memset (buf->buf + (y - buf->rect.y0) * buf->buf_rowstride, r, 4 * (buf->rect.x1 - buf->rect.x0)); - } - } } Geom::Affine sp_canvas_item_i2p_affine (SPCanvasItem * item) |
