summaryrefslogtreecommitdiff
path: root/gtk/plotters.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-02-14 22:05:39 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-02-14 22:05:39 +0000
commit94e7b44ebc1710eed0f870428ddb5bfcd85858fa (patch)
tree2d75845c082051bac12cd41cf2d5139e019c16bf /gtk/plotters.c
parent3ce0613193ca945566ec9ea056d6a67eae7d199c (diff)
downloadnetsurf-94e7b44ebc1710eed0f870428ddb5bfcd85858fa.tar.gz
netsurf-94e7b44ebc1710eed0f870428ddb5bfcd85858fa.tar.bz2
Pass clip rect to clip plotters as struct. Simplify clip rect handling in debug window code. Pass clip rect to select menu as struct.
svn path=/trunk/netsurf/; revision=11683
Diffstat (limited to 'gtk/plotters.c')
-rw-r--r--gtk/plotters.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gtk/plotters.c b/gtk/plotters.c
index 460a65a6f..76273bd0e 100644
--- a/gtk/plotters.c
+++ b/gtk/plotters.c
@@ -133,17 +133,17 @@ static inline void nsgtk_set_dashed(void)
}
/** Set clipping area for subsequent plot operations. */
-static bool nsgtk_plot_clip(int clip_x0, int clip_y0, int clip_x1, int clip_y1)
+static bool nsgtk_plot_clip(const struct rect *clip)
{
cairo_reset_clip(current_cr);
- cairo_rectangle(current_cr, clip_x0, clip_y0,
- clip_x1 - clip_x0, clip_y1 - clip_y0);
+ cairo_rectangle(current_cr, clip->x0, clip->y0,
+ clip->x1 - clip->x0, clip->y1 - clip->y0);
cairo_clip(current_cr);
- cliprect.x = clip_x0;
- cliprect.y = clip_y0;
- cliprect.width = clip_x1 - clip_x0;
- cliprect.height = clip_y1 - clip_y0;
+ cliprect.x = clip->x0;
+ cliprect.y = clip->y0;
+ cliprect.width = clip->x1 - clip->x0;
+ cliprect.height = clip->y1 - clip->y0;
gdk_gc_set_clip_rectangle(current_gc, &cliprect);
return true;