summaryrefslogtreecommitdiff
path: root/framebuffer/fb_plotters.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2009-02-12 14:16:40 +0000
committerVincent Sanders <vince@netsurf-browser.org>2009-02-12 14:16:40 +0000
commit614de7d473b10710cb96d17e76c23a8ec7236b91 (patch)
tree940d69395a0edd49f33158a88f68743933b0d68c /framebuffer/fb_plotters.c
parent06ec51993ddf4e66feaf18464cbe8daaf8624e26 (diff)
downloadnetsurf-614de7d473b10710cb96d17e76c23a8ec7236b91.tar.gz
netsurf-614de7d473b10710cb96d17e76c23a8ec7236b91.tar.bz2
Fix window clipping and introduce concept of "root" framebuffer window to allow for navigation and status bars
svn path=/trunk/netsurf/; revision=6456
Diffstat (limited to 'framebuffer/fb_plotters.c')
-rw-r--r--framebuffer/fb_plotters.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/framebuffer/fb_plotters.c b/framebuffer/fb_plotters.c
index a7bbfc28a..72e892b8a 100644
--- a/framebuffer/fb_plotters.c
+++ b/framebuffer/fb_plotters.c
@@ -184,15 +184,13 @@ bool fb_clip(int x0, int y0, int x1, int y1)
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;
+ clip.y1 = g->y + g->height;
if (fb_plotters_clip_rect(&clip, &x0, &y0, &x1, &y1)) {
/* new clipping region is inside the root window */
@@ -201,6 +199,11 @@ bool fb_clip(int x0, int y0, int x1, int y1)
fb_plot_ctx.x1 = x1;
fb_plot_ctx.y1 = y1;
}
+
+ LOG(("%d, %d - %d, %d clipped to %d, %d - %d, %d",
+ x0,y0,x1,y1,
+ fb_plot_ctx.x0, fb_plot_ctx.y0, fb_plot_ctx.x1, fb_plot_ctx.y1));
+
return true;
}