Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/bb3ac176bd361d9275228f770394918e0b119149
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/bb3ac176bd361d9275228f770394918e0b119149
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/bb3ac176bd361d9275228f770394918e0b119149

The branch, master has been updated
       via  bb3ac176bd361d9275228f770394918e0b119149 (commit)
      from  a8a015b224cf37a202e3b0e5f149d1e4585a0aca (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=bb3ac176bd361d9275228f770394918e0b119149
commit bb3ac176bd361d9275228f770394918e0b119149
Author: John-Mark Bell <[email protected]>
Commit: John-Mark Bell <[email protected]>

    RISC OS: fix printing
    
    Changes to the handling of clip rectangles to support EX0/EY0
    modes back in 2021 failed to also set up the clip context when
    printing.  Upshot being that the global unscaled clip rectangle
    contents were completely indeterminate when printing.

diff --git a/frontends/riscos/print.c b/frontends/riscos/print.c
index e87f47857..2495b799e 100644
--- a/frontends/riscos/print.c
+++ b/frontends/riscos/print.c
@@ -674,10 +674,16 @@ bool print_document(struct gui_window *g, const char 
*filename)
                        NSLOG(netsurf, INFO,
                              "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;
+
+                       ro_plot_clip_rect.x0 = b.x0 - ro_plot_origin_x;
+                       ro_plot_clip_rect.y0 = ro_plot_origin_y - b.y0;
+                       ro_plot_clip_rect.x1 = b.x1 - ro_plot_origin_x;
+                       ro_plot_clip_rect.y1 = ro_plot_origin_y - b.y1;
+
+                       clip.x0 = (ro_plot_clip_rect.x0    ) / 2; /* left   */
+                       clip.y0 = (ro_plot_clip_rect.y1    ) / 2; /* top    */
+                       clip.x1 = (ro_plot_clip_rect.x1 + 1) / 2; /* right  */
+                       clip.y1 = (ro_plot_clip_rect.y0 + 1) / 2; /* bottom */
 
                        data.x = 0;
                        data.y = 0;


-----------------------------------------------------------------------

Summary of changes:
 frontends/riscos/print.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/frontends/riscos/print.c b/frontends/riscos/print.c
index e87f47857..2495b799e 100644
--- a/frontends/riscos/print.c
+++ b/frontends/riscos/print.c
@@ -674,10 +674,16 @@ bool print_document(struct gui_window *g, const char 
*filename)
                        NSLOG(netsurf, INFO,
                              "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;
+
+                       ro_plot_clip_rect.x0 = b.x0 - ro_plot_origin_x;
+                       ro_plot_clip_rect.y0 = ro_plot_origin_y - b.y0;
+                       ro_plot_clip_rect.x1 = b.x1 - ro_plot_origin_x;
+                       ro_plot_clip_rect.y1 = ro_plot_origin_y - b.y1;
+
+                       clip.x0 = (ro_plot_clip_rect.x0    ) / 2; /* left   */
+                       clip.y0 = (ro_plot_clip_rect.y1    ) / 2; /* top    */
+                       clip.x1 = (ro_plot_clip_rect.x1 + 1) / 2; /* right  */
+                       clip.y1 = (ro_plot_clip_rect.y0 + 1) / 2; /* bottom */
 
                        data.x = 0;
                        data.y = 0;


-- 
NetSurf Browser

Reply via email to