diff options
author | James Bursa <james@netsurf-browser.org> | 2003-06-14 11:34:02 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-06-14 11:34:02 +0000 |
commit | ce6dbbb5db1d4ffe77ca99411ddb2d19694eff9c (patch) | |
tree | da55dfa629e76bcdd3734e9e35fabdc367008628 /riscos/png.c | |
parent | bdad21d51ca884918396fa999fc49701086b6c45 (diff) | |
download | netsurf-ce6dbbb5db1d4ffe77ca99411ddb2d19694eff9c.tar.gz netsurf-ce6dbbb5db1d4ffe77ca99411ddb2d19694eff9c.tar.bz2 |
[project @ 2003-06-14 11:34:02 by bursa]
Scale JPEGs and PNGs when plotting.
svn path=/import/netsurf/; revision=179
Diffstat (limited to 'riscos/png.c')
-rw-r--r-- | riscos/png.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/riscos/png.c b/riscos/png.c index 63e26c89e..b3d174d05 100644 --- a/riscos/png.c +++ b/riscos/png.c @@ -1,5 +1,5 @@ /** - * $Id: png.c,v 1.2 2003/06/05 14:24:58 bursa Exp $ + * $Id: png.c,v 1.3 2003/06/14 11:34:02 bursa Exp $ */ #include <assert.h> @@ -283,9 +283,9 @@ void nspng_destroy(struct content *c) void nspng_redraw(struct content *c, long x, long y, unsigned long width, unsigned long height) { - /* TODO: scale to width, height */ int size; osspriteop_trans_tab *table; + os_factors factors; xcolourtrans_generate_table_for_sprite(c->data.png.sprite_area, (osspriteop_id) (c->data.png.sprite_area + 1), @@ -297,10 +297,15 @@ void nspng_redraw(struct content *c, long x, long y, colourtrans_CURRENT_MODE, colourtrans_CURRENT_PALETTE, table, colourtrans_GIVEN_SPRITE, 0, 0, 0); + factors.xmul = width; + factors.ymul = height; + factors.xdiv = c->width * 2; + factors.ydiv = c->height * 2; + xosspriteop_put_sprite_scaled(osspriteop_PTR, c->data.png.sprite_area, (osspriteop_id) (c->data.png.sprite_area + 1), - x, y, 0, 0, table); + x, y, os_ACTION_OVERWRITE, &factors, table); xfree(table); } |