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/jpeg.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/jpeg.c')
-rw-r--r-- | riscos/jpeg.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/riscos/jpeg.c b/riscos/jpeg.c index 090f36cf4..f3f939551 100644 --- a/riscos/jpeg.c +++ b/riscos/jpeg.c @@ -1,5 +1,5 @@ /** - * $Id: jpeg.c,v 1.4 2003/05/10 11:13:34 bursa Exp $ + * $Id: jpeg.c,v 1.5 2003/06/14 11:34:02 bursa Exp $ * * This is just a temporary implementation using the JPEG renderer * available in some versions of RISC OS. @@ -66,9 +66,14 @@ void jpeg_destroy(struct content *c) void jpeg_redraw(struct content *c, long x, long y, unsigned long width, unsigned long height) { - /* TODO: scale to width, height */ + os_factors factors; + factors.xmul = width; + factors.ymul = height; + factors.xdiv = c->width * 2; + factors.ydiv = c->height * 2; + xjpeg_plot_scaled((jpeg_image *) c->data.jpeg.data, - x, y, 0, (int) c->data.jpeg.length, + x, y, &factors, (int) c->data.jpeg.length, jpeg_SCALE_DITHERED); } |