summaryrefslogtreecommitdiff
path: root/riscos/image.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-11-02 23:23:07 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-11-02 23:23:07 +0000
commit1fbcdd14d550e005863096ed216f490986a583c1 (patch)
tree60c17e5f327391a726e5508376a860522af5b665 /riscos/image.c
parentbe3ce1f3a9f7fed2613f5cf28c5e4d83fae7497b (diff)
downloadnetsurf-1fbcdd14d550e005863096ed216f490986a583c1.tar.gz
netsurf-1fbcdd14d550e005863096ed216f490986a583c1.tar.bz2
[project @ 2004-11-02 23:23:07 by rjw]
Fix for recent GIF decoding bug. Rectangular pixel mode-friendly sprites for hotlist. Slight change to history image size to please Tinct. Support for foreground and background image quality settings. Support for error diffusion and bi-linear filtering (Tinct still requires some further work) svn path=/import/netsurf/; revision=1336
Diffstat (limited to 'riscos/image.c')
-rw-r--r--riscos/image.c42
1 files changed, 16 insertions, 26 deletions
diff --git a/riscos/image.c b/riscos/image.c
index e0b06b6ca..cddb378f9 100644
--- a/riscos/image.c
+++ b/riscos/image.c
@@ -22,7 +22,7 @@
static bool image_redraw_tinct(osspriteop_area *area, int x, int y,
int req_width, int req_height, int width, int height,
unsigned long background_colour, bool repeatx, bool repeaty,
- bool alpha);
+ bool alpha, unsigned int tinct_options);
static bool image_redraw_os(osspriteop_area *area, int x, int y,
int req_width, int req_height, int width, int height);
@@ -39,31 +39,36 @@ static bool image_redraw_os(osspriteop_area *area, int x, int y,
* \param background_colour The background colour to blend to
* \param repeatx Repeat the image in the x direction
* \param repeaty Repeat the image in the y direction
+ * \param background Use background image settings (otherwise foreground)
* \param type The plot method to use
* \return true on success, false otherwise
*/
bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
int req_height, int width, int height,
unsigned long background_colour,
- bool repeatx, bool repeaty,image_type type)
+ bool repeatx, bool repeaty, bool background, image_type type)
{
+ unsigned int tinct_options;
req_width *= 2;
req_height *= 2;
width *= 2;
height *= 2;
+ tinct_options = background ? option_bg_plot_style : option_fg_plot_style;
switch (type) {
case IMAGE_PLOT_TINCT_ALPHA:
return image_redraw_tinct(area, x, y,
req_width, req_height,
width, height,
background_colour,
- repeatx, repeaty, true);
+ repeatx, repeaty, true,
+ tinct_options);
case IMAGE_PLOT_TINCT_OPAQUE:
return image_redraw_tinct(area, x, y,
req_width, req_height,
width, height,
background_colour,
- repeatx, repeaty, false);
+ repeatx, repeaty, false,
+ tinct_options);
case IMAGE_PLOT_OS:
return image_redraw_os(area, x, y, req_width,
req_height, width, height);
@@ -88,38 +93,23 @@ bool image_redraw(osspriteop_area *area, int x, int y, int req_width,
* \param repeatx Repeat the image in the x direction
* \param repeaty Repeat the image in the y direction
* \param alpha Use the alpha channel
+ * \param tinct_options The base option set to use
* \return true on success, false otherwise
*/
bool image_redraw_tinct(osspriteop_area *area, int x, int y,
int req_width, int req_height, int width, int height,
unsigned long background_colour, bool repeatx, bool repeaty,
- bool alpha)
+ bool alpha, unsigned int tinct_options)
{
- unsigned int tinct_options;
_kernel_oserror *error;
- if (ro_gui_current_redraw_gui) {
- tinct_options =
- (ro_gui_current_redraw_gui->option.filter_sprites ?
- tinct_BILINEAR_FILTER : 0)
- |
- (ro_gui_current_redraw_gui->option.dither_sprites ?
- tinct_DITHER : 0);
- } else {
- tinct_options =
- (option_filter_sprites ? tinct_BILINEAR_FILTER : 0)
- |
- (option_dither_sprites ? tinct_DITHER : 0);
- }
-
- if (print_active) {
- tinct_options |= tinct_USE_OS_SPRITE_OP |
- background_colour << tinct_BACKGROUND_SHIFT;
- }
-
+ /* Set up our flagword
+ */
+ tinct_options |= background_colour << tinct_BACKGROUND_SHIFT;
+ if (print_active)
+ tinct_options |= tinct_USE_OS_SPRITE_OP;
if (repeatx)
tinct_options |= tinct_FILL_HORIZONTALLY;
-
if (repeaty)
tinct_options |= tinct_FILL_VERTICALLY;