summaryrefslogtreecommitdiff
path: root/windows
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 /windows
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 'windows')
-rw-r--r--windows/plot.c13
1 files changed, 6 insertions, 7 deletions
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;
}