r5399 vince - in /branches/vince/netsurf-fb/framebuffer: fb_gui.h fb_plotters.c

netsurf at semichrome.net netsurf at semichrome.net
Mon Sep 22 18:43:48 BST 2008


Author: vince
Date: Mon Sep 22 12:43:48 2008
New Revision: 5399

URL: http://source.netsurf-browser.org?rev=5399&view=rev
Log:
ensure clipping region lies within window, caused by knockout renderer

Modified:
    branches/vince/netsurf-fb/framebuffer/fb_gui.h
    branches/vince/netsurf-fb/framebuffer/fb_plotters.c

Modified: branches/vince/netsurf-fb/framebuffer/fb_gui.h
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_gui.h?rev=5399&r1=5398&r2=5399&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_gui.h (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_gui.h Mon Sep 22 12:43:48 2008
@@ -58,7 +58,7 @@
 };
 
 extern framebuffer_t *framebuffer;
-extern struct gui_window *current_window;
+extern struct gui_window *window_list;
 
 /* scroll a window */
 void fb_window_scroll(struct gui_window *g, int x, int y);

Modified: branches/vince/netsurf-fb/framebuffer/fb_plotters.c
URL: http://source.netsurf-browser.org/branches/vince/netsurf-fb/framebuffer/fb_plotters.c?rev=5399&r1=5398&r2=5399&view=diff
==============================================================================
--- branches/vince/netsurf-fb/framebuffer/fb_plotters.c (original)
+++ branches/vince/netsurf-fb/framebuffer/fb_plotters.c Mon Sep 22 12:43:48 2008
@@ -171,10 +171,22 @@
 /* generic setting of clipping rectangle */
 bool fb_clip(int x0, int y0, int x1, int y1)
 {
+        bbox_t clip;
+        struct gui_window *g;
+
+        g = window_list;
+
         //LOG(("x0 %d, y0 %d, x1 %d, y1 %d", x0, y0, x1, y1));
 
 	if (x1 < x0) SWAP(x0, x1);
 	if (y1 < y0) SWAP(y0, y1);
+
+        clip.x0 = g->x;
+        clip.y0 = g->y;
+        clip.x1 = g->x + g->width;
+        clip.y1 = g->x + g->height;
+
+        fb_plotters_clip_rect(&clip, &x0, &y0, &x1, &y1);
 
         fb_plot_ctx.x0 = x0;
         fb_plot_ctx.y0 = y0;




More information about the netsurf-commits mailing list