summaryrefslogtreecommitdiff
path: root/riscos/htmlredraw.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-06-10 17:21:58 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-06-10 17:21:58 +0000
commitbbd66fca97984030c7c16d673d8bde1283b35586 (patch)
tree0d3eada891ce7835c601e3cf88faad7244b61eb8 /riscos/htmlredraw.c
parent18ea7c459ca80b70e559385a7444f939801f5f6d (diff)
downloadnetsurf-bbd66fca97984030c7c16d673d8bde1283b35586.tar.gz
netsurf-bbd66fca97984030c7c16d673d8bde1283b35586.tar.bz2
[project @ 2004-06-10 17:21:58 by jmb]
Fix some redraw issues caused by the background rendering code Remove some spurious minus signs svn path=/import/netsurf/; revision=949
Diffstat (limited to 'riscos/htmlredraw.c')
-rw-r--r--riscos/htmlredraw.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/riscos/htmlredraw.c b/riscos/htmlredraw.c
index be16fee17..22f4bd77e 100644
--- a/riscos/htmlredraw.c
+++ b/riscos/htmlredraw.c
@@ -12,6 +12,7 @@
#include "oslib/colourtrans.h"
#include "oslib/draw.h"
#include "oslib/font.h"
+#include "oslib/os.h"
#include "swis.h"
#include "netsurf/utils/config.h"
#include "netsurf/css/css.h"
@@ -101,6 +102,9 @@ void html_redraw_box(struct content *content, struct box * box,
int padding_width, padding_height;
int x0, y0, x1, y1;
int colour;
+ os_VDU_VAR_LIST(5) vars = { { os_VDUVAR_GWL_COL, os_VDUVAR_GWB_ROW,
+ os_VDUVAR_GWR_COL, os_VDUVAR_GWT_ROW, -1 } };
+ os_vdu_var cgw[4];
x += box->x * 2 * scale;
y -= box->y * 2 * scale;
@@ -209,6 +213,9 @@ void html_redraw_box(struct content *content, struct box * box,
y1 = clip_y1;
}
+ /* read current graphics window dimensions */
+ xos_read_vdu_variables((os_vdu_var_list const *) &vars, (int*)&cgw);
+
/* background colour */
if (box->style != 0 && box->style->background_color != TRANSPARENT) {
/* find intersection of clip box and padding box */
@@ -229,6 +236,11 @@ void html_redraw_box(struct content *content, struct box * box,
/* plot background image */
html_redraw_background(x, y, width, clip_y1-clip_y0, box);
+ /* restore previous graphics window, if necessary */
+ if (box->style != 0 && box->style->background_color != TRANSPARENT)
+ /* should probably take account of the eigvalues here... */
+ html_redraw_clip(cgw[0]*2, cgw[1]*2, cgw[2]*2, cgw[3]*2);
+
if (box->object) {
content_redraw(box->object, x + padding_left, y - padding_top,
width, height, x0, y0, x1, y1, scale);
@@ -649,13 +661,13 @@ void html_redraw_background(long xi, long yi, int width, int height,
#ifdef WITH_JPEG
case CONTENT_JPEG:
_swix(Tinct_Plot, _INR(2,4) | _IN(7),
- ((char*) box->background->data.jpeg.sprite_area + box->background->data.jpeg.sprite_area->first), x, -y, tinct_options);
+ ((char*) box->background->data.jpeg.sprite_area + box->background->data.jpeg.sprite_area->first), x, y, tinct_options);
break;
#endif
#ifdef WITH_GIF
case CONTENT_GIF:
_swix(Tinct_PlotAlpha, _INR(2,4) | _IN(7),
- (char*) box->background->data.gif.gif->frame_image, x, -y, tinct_options);
+ (char*) box->background->data.gif.gif->frame_image, x, y, tinct_options);
break;
#endif
/**\todo Add draw/sprite background support? */