summaryrefslogtreecommitdiff
path: root/riscos
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2004-08-09 17:04:32 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2004-08-09 17:04:32 +0000
commitc682f9a5eae034cdbad984bb708e600952c61198 (patch)
treed3b2ba299cd32444f74edbc15088c6ca35ce2b22 /riscos
parentc9bd6fa9fce386526ea1327adea56128648f3355 (diff)
downloadnetsurf-c682f9a5eae034cdbad984bb708e600952c61198.tar.gz
netsurf-c682f9a5eae034cdbad984bb708e600952c61198.tar.bz2
[project @ 2004-08-09 17:04:32 by jmb]
Fix rectangle positioning bug which resulted in garbage printouts. Break out hard-coded scale factor Protect against invalid memory access. svn path=/import/netsurf/; revision=1207
Diffstat (limited to 'riscos')
-rw-r--r--riscos/print.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/riscos/print.c b/riscos/print.c
index a15d9b35d..389b0c259 100644
--- a/riscos/print.c
+++ b/riscos/print.c
@@ -42,6 +42,7 @@
struct gui_window *print_current_window = 0;
static bool print_in_background = false;
+static float print_scale = 1.0;
static int print_num_copies = 1;
static bool print_bg_images = true;
static int print_max_sheets = -1;
@@ -422,7 +423,9 @@ void print_dataload_bounce(wimp_message *m)
*/
void print_cleanup(void)
{
- print_current_window->option.background_images = print_bg_images;
+ if (print_current_window)
+ print_current_window->option.background_images =
+ print_bg_images;
print_current_window = 0;
print_max_sheets = -1;
xwimp_create_menu((wimp_menu *)-1, 0, 0);
@@ -593,11 +596,12 @@ void print_document(struct gui_window *g, const char *filename)
while (more) {
LOG(("redrawing area: [(%d, %d), (%d, %d)]", b.x0, b.y0, b.x1, b.y1));
if (c) {
- content_redraw(c, b.x0, b.y1+(yscroll*2),
+ content_redraw(c, left/400,
+ top/400 + (yscroll*2),
c->width * 2, c->height * 2,
b.x0, b.y0,
b.x1-1, b.y1-1,
- 1.0 /* scale == 100% */);
+ print_scale);
}
e = xpdriver_get_rectangle(&b, &more, 0);
if (e) {