summaryrefslogtreecommitdiff
path: root/riscos/png.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-05-09 21:05:24 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-05-09 21:05:24 +0000
commite5863b17d091895b199240ff970eb663a7aaaa8d (patch)
tree6f3002b456143af08c75552b1140ff060bdccd72 /riscos/png.c
parent226c002d574e9e366ee9782675063c835b0d1a5c (diff)
downloadnetsurf-e5863b17d091895b199240ff970eb663a7aaaa8d.tar.gz
netsurf-e5863b17d091895b199240ff970eb663a7aaaa8d.tar.bz2
[project @ 2004-05-09 21:05:24 by rjw]
Local options are now adhered to (dither, filter, animate). svn path=/import/netsurf/; revision=847
Diffstat (limited to 'riscos/png.c')
-rw-r--r--riscos/png.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/riscos/png.c b/riscos/png.c
index c8fe028b4..7bbc9827f 100644
--- a/riscos/png.c
+++ b/riscos/png.c
@@ -15,6 +15,7 @@
#include "oslib/osspriteop.h"
#include "netsurf/utils/config.h"
#include "netsurf/content/content.h"
+#include "netsurf/riscos/gui.h"
#include "netsurf/riscos/options.h"
#include "netsurf/riscos/png.h"
#include "netsurf/riscos/tinct.h"
@@ -249,6 +250,18 @@ void nspng_redraw(struct content *c, long x, long y,
long clip_x0, long clip_y0, long clip_x1, long clip_y1,
float scale)
{
+ unsigned int tinct_options;
+
+ /* If we have a gui_window then we work from there, if not we use the global
+ settings as we are drawing a thumbnail.
+ */
+ if (ro_gui_current_redraw_gui) {
+ tinct_options = (ro_gui_current_redraw_gui->option_filter_sprites?(1<<1):0) |
+ (ro_gui_current_redraw_gui->option_dither_sprites?(1<<2):0);
+ } else {
+ tinct_options = (option_filter_sprites?(1<<1):0) |
+ (option_dither_sprites?(1<<2):0);
+ }
/* Tinct currently only handles 32bpp sprites that have an embedded alpha mask. Any
sprites not matching the required specifications are ignored. See the Tinct
@@ -258,6 +271,6 @@ void nspng_redraw(struct content *c, long x, long y,
((char *) c->data.png.sprite_area + c->data.png.sprite_area->first),
x, (int)(y - height),
width, height,
- (option_filter_sprites?(1<<1):0) | (option_dither_sprites?(1<<2):0));
+ tinct_options);
}
#endif