summaryrefslogtreecommitdiff
path: root/riscos/print.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-02-13 22:25:11 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-02-13 22:25:11 +0000
commitfe7921a387c5a71c8ecba7bb605679b7dab4b86f (patch)
treed31c249671b3e71f498dd48b6c42b56f1e278f7f /riscos/print.c
parentdb2f823e9990cee17b1072ce2296ef88062bc7bd (diff)
downloadnetsurf-fe7921a387c5a71c8ecba7bb605679b7dab4b86f.tar.gz
netsurf-fe7921a387c5a71c8ecba7bb605679b7dab4b86f.tar.bz2
Pass clip rect as struct through content_redraw api. Update the front ends to use this. Note only RO build tested.
svn path=/trunk/netsurf/; revision=11670
Diffstat (limited to 'riscos/print.c')
-rw-r--r--riscos/print.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/riscos/print.c b/riscos/print.c
index 192fe5de4..575990f27 100644
--- a/riscos/print.c
+++ b/riscos/print.c
@@ -635,7 +635,7 @@ bool print_document(struct gui_window *g, const char *filename)
print_active = true;
do {
- int clip_x0, clip_y0, clip_x1, clip_y1;
+ struct rect clip;
os_box b;
os_hom_trfm t;
os_coord p;
@@ -697,14 +697,14 @@ bool 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));
- clip_x0 = (b.x0 - ro_plot_origin_x) / 2;
- clip_y0 = (ro_plot_origin_y - b.y1) / 2;
- clip_x1 = (b.x1 - ro_plot_origin_x) / 2;
- clip_y1 = (ro_plot_origin_y - b.y0) / 2;
+ clip.x0 = (b.x0 - ro_plot_origin_x) / 2;
+ clip.y0 = (ro_plot_origin_y - b.y1) / 2;
+ clip.x1 = (b.x1 - ro_plot_origin_x) / 2;
+ clip.y1 = (ro_plot_origin_y - b.y0) / 2;
if (!content_redraw(h, 0, 0,
content_get_width(h),
content_get_height(h),
- clip_x0, clip_y0, clip_x1, clip_y1,
+ &clip,
print_scale,
0xFFFFFF)) {
error_message = "redraw error";
@@ -805,6 +805,7 @@ error:
const char *print_declare_fonts(hlcache_handle *h)
{
unsigned int i;
+ struct rect clip;
const char *error_message = 0;
os_error *error;
@@ -813,10 +814,13 @@ const char *print_declare_fonts(hlcache_handle *h)
print_fonts_count = 0;
print_fonts_error = 0;
+ clip.x0 = clip.y0 = INT_MIN;
+ clip.x1 = clip.y1 = INT_MAX;
+
plot = print_fonts_plotters;
if (!content_redraw(h, 0, 0, content_get_width(h),
content_get_height(h),
- INT_MIN, INT_MIN, INT_MAX, INT_MAX, 1, 0xffffff)) {
+ &clip, 1, 0xffffff)) {
if (print_fonts_error)
return print_fonts_error;
return "Declaring fonts failed.";