From 94e7b44ebc1710eed0f870428ddb5bfcd85858fa Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 14 Feb 2011 22:05:39 +0000 Subject: 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 --- windows/plot.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'windows/plot.c') diff --git a/windows/plot.c b/windows/plot.c index 050bf6136..2e21ae1fd 100644 --- a/windows/plot.c +++ b/windows/plot.c @@ -52,17 +52,16 @@ static float nsws_plot_scale = 1.0; static RECT plot_clip; /* currently set clipping rectangle */ -static bool clip(int x0, int y0, int x1, int y1) +static bool clip(const struct rect *clip) { - #if NSWS_PLOT_DEBUG - LOG(("clip %d,%d to %d,%d", x0, y0, x1, y1)); + LOG(("clip %d,%d to %d,%d", clip->x0, clip->y0, clip->x1, clip->y1)); #endif - plot_clip.left = x0; - plot_clip.top = y0; - plot_clip.right = x1 + 1; /* rectangle co-ordinates are exclusive */ - plot_clip.bottom = y1 + 1; /* rectangle co-ordinates are exclusive */ + plot_clip.left = clip->x0; + plot_clip.top = clip->y0; + plot_clip.right = clip->x1 + 1; /* co-ordinates are exclusive */ + plot_clip.bottom = clip->y1 + 1; /* co-ordinates are exclusive */ return true; } -- cgit v1.2.3