From c04b939c8cdc75a0d5faf5bae0805d96d6e74bde Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 2 Jul 2009 21:23:54 +0000 Subject: Fix by tlsa for content which is updated by the core like animated gifs and forms svn path=/trunk/netsurf/; revision=8270 --- framebuffer/fbtk.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'framebuffer/fbtk.c') diff --git a/framebuffer/fbtk.c b/framebuffer/fbtk.c index 3320dbee4..59c6e75f7 100644 --- a/framebuffer/fbtk.c +++ b/framebuffer/fbtk.c @@ -187,6 +187,17 @@ bool fbtk_clip_rect(const bbox_t * restrict clip, bbox_t * restrict box) return true; } +/* clip a rectangle to a widgets area rectangle */ +bool fbtk_clip_to_widget(fbtk_widget_t *widget, bbox_t * restrict box) +{ + bbox_t wbox; + wbox.x0 = 0; + wbox.y0 = 0; + wbox.x1 = widget->width; + wbox.y1 = widget->height; + return fbtk_clip_rect(&wbox, box); +} + /* creates a new widget of a given type */ static fbtk_widget_t * -- cgit v1.2.3