summaryrefslogtreecommitdiff
path: root/framebuffer/fbtk.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2009-07-02 21:23:54 +0000
committerVincent Sanders <vince@netsurf-browser.org>2009-07-02 21:23:54 +0000
commitc04b939c8cdc75a0d5faf5bae0805d96d6e74bde (patch)
tree5eb6bf564cdb426d9447e31fafc7c968f0151e84 /framebuffer/fbtk.c
parent1165edf662baa3286ff76df54f2db6819340d0a3 (diff)
downloadnetsurf-c04b939c8cdc75a0d5faf5bae0805d96d6e74bde.tar.gz
netsurf-c04b939c8cdc75a0d5faf5bae0805d96d6e74bde.tar.bz2
Fix by tlsa for content which is updated by the core like animated gifs and forms
svn path=/trunk/netsurf/; revision=8270
Diffstat (limited to 'framebuffer/fbtk.c')
-rw-r--r--framebuffer/fbtk.c11
1 files changed, 11 insertions, 0 deletions
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 *