diff options
| author | John Bintz <me@johnbintz.com> | 2008-04-18 01:31:11 +0000 |
|---|---|---|
| committer | johncoswell <johncoswell@users.sourceforge.net> | 2008-04-18 01:31:11 +0000 |
| commit | 7e306abedf851e7fe4dfed90b5fcd7f8ca678c7a (patch) | |
| tree | cdcbee9aab8e39bbb3091b2dacff3d456a2a2598 /src/flood-context.cpp | |
| parent | Have Paint Bucket generate the necessary GrayMap for potrace directly, skippi... (diff) | |
| download | inkscape-7e306abedf851e7fe4dfed90b5fcd7f8ca678c7a.tar.gz inkscape-7e306abedf851e7fe4dfed90b5fcd7f8ca678c7a.zip | |
Small Paint Bucket optimization for creating GrayMap
(bzr r5467)
Diffstat (limited to 'src/flood-context.cpp')
| -rw-r--r-- | src/flood-context.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/flood-context.cpp b/src/flood-context.cpp index f58ab0830..ee7f1b0da 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -410,9 +410,12 @@ static void do_trace(bitmap_coords_info bci, guchar *trace_px, SPDesktop *deskto GrayMap *gray_map = GrayMapCreate(bci.width, bci.height); for (unsigned int y = 0; y < bci.height ; y++) { + unsigned long *gray_map_t = gray_map->rows[y]; + trace_t = get_pixel(trace_px, 0, y, bci.width); for (unsigned int x = 0; x < bci.width ; x++) { - gray_map->setPixel(gray_map, x, y, is_pixel_colored(trace_t) ? GRAYMAP_BLACK : GRAYMAP_WHITE); + *gray_map_t = is_pixel_colored(trace_t) ? GRAYMAP_BLACK : GRAYMAP_WHITE; + gray_map_t++; trace_t += 4; } } |
