diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2006-02-21 20:49:12 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2006-02-21 20:49:12 +0000 |
commit | 4cc85469cb26f8ea1a8f14f17bddb6a5cbea1e88 (patch) | |
tree | 2a8287146412196c1ded7a187afae58469d5f641 /image/jpeg.c | |
parent | b6c6d7777277caf99ade1389c180f4a428b4a1c6 (diff) | |
download | netsurf-4cc85469cb26f8ea1a8f14f17bddb6a5cbea1e88.tar.gz netsurf-4cc85469cb26f8ea1a8f14f17bddb6a5cbea1e88.tar.bz2 |
[project @ 2006-02-21 20:49:11 by rjw]
Allow any content to be used as a background. Simplify bitmap code.
svn path=/import/netsurf/; revision=2087
Diffstat (limited to 'image/jpeg.c')
-rw-r--r-- | image/jpeg.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/image/jpeg.c b/image/jpeg.c index 86f205964..3efe698df 100644 --- a/image/jpeg.c +++ b/image/jpeg.c @@ -94,7 +94,7 @@ bool nsjpeg_convert(struct content *c, int w, int h) width = cinfo.output_width; height = cinfo.output_height; - bitmap = bitmap_create(width, height, false); + bitmap = bitmap_create(width, height, BITMAP_ALLOCATE_MEMORY); if (bitmap) pixels = bitmap_get_buffer(bitmap); if ((!bitmap) || (!pixels)) { @@ -227,6 +227,22 @@ bool nsjpeg_redraw(struct content *c, int x, int y, /** + * Redraw a CONTENT_JPEG with appropriate tiling. + */ + +bool nsjpeg_redraw_tiled(struct content *c, int x, int y, + int width, int height, + int clip_x0, int clip_y0, int clip_x1, int clip_y1, + float scale, unsigned long background_colour, + bool repeat_x, bool repeat_y) +{ + return plot.bitmap_tile(x, y, width, height, + c->bitmap, background_colour, + repeat_x, repeat_y); +} + + +/** * Destroy a CONTENT_JPEG and free all resources it owns. */ |