summaryrefslogtreecommitdiff
path: root/amiga/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 /amiga/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 'amiga/plotters.c')
-rwxr-xr-xamiga/plotters.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/amiga/plotters.c b/amiga/plotters.c
index f89b12c04..9c61ad259 100755
--- a/amiga/plotters.c
+++ b/amiga/plotters.c
@@ -400,7 +400,7 @@ bool ami_polygon(const int *p, unsigned int n, const plot_style_t *style)
}
-bool ami_clip(int x0, int y0, int x1, int y1)
+bool ami_clip(const struct rect *clip)
{
#ifdef AMI_PLOTTER_DEBUG
LOG(("[ami_plotter] Entered ami_clip()"));
@@ -412,10 +412,10 @@ bool ami_clip(int x0, int y0, int x1, int y1)
{
reg = NewRegion();
- glob->rect.MinX = x0;
- glob->rect.MinY = y0;
- glob->rect.MaxX = x1-1;
- glob->rect.MaxY = y1-1;
+ glob->rect.MinX = clip->x0;
+ glob->rect.MinY = clip->y0;
+ glob->rect.MaxX = clip->x1-1;
+ glob->rect.MaxY = clip->y1-1;
OrRectRegion(reg,&glob->rect);
@@ -426,7 +426,8 @@ bool ami_clip(int x0, int y0, int x1, int y1)
#ifdef NS_AMIGA_CAIRO_ALL
cairo_reset_clip(glob->cr);
- cairo_rectangle(glob->cr, x0, y0, x1 - x0, y1 - y0);
+ cairo_rectangle(glob->cr, clip->x0, clip->y0,
+ clip->x1 - clip->x0, clip->y1 - clip->y0);
cairo_clip(glob->cr);
#endif