Use more appropriate types for pt_regs struct, e.g. 16-bit types for 16-bit
[cake.git] / rom / graphics / eraserect.c
blob83cc81b0f843fe2db2e7e45520ea188911a21e13
1 /*
2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
3 $Id$ $Log
5 Desc: Graphics function EraseRect()
6 Lang: english
7 */
8 #include <aros/debug.h>
9 #include "graphics_intern.h"
10 #include <graphics/rastport.h>
11 #include <aros/asmcall.h>
12 #include <utility/hooks.h>
13 #include <proto/oop.h>
14 #include <proto/layers.h>
15 #include "gfxfuncsupport.h"
17 #define LayersBase (struct LayersBase *)(GfxBase->gb_LayersBase)
19 /*****************************************************************************
21 NAME */
22 #include <graphics/rastport.h>
23 #include <proto/graphics.h>
25 AROS_LH5(void, EraseRect,
27 /* SYNOPSIS */
28 AROS_LHA(struct RastPort *, rp, A1),
29 AROS_LHA(LONG , xMin, D0),
30 AROS_LHA(LONG , yMin, D1),
31 AROS_LHA(LONG , xMax, D2),
32 AROS_LHA(LONG , yMax, D3),
34 /* LOCATION */
35 struct GfxBase *, GfxBase, 135, Graphics)
37 /* FUNCTION
38 Fill a rectangular area with the current BackFill hook.
39 If layered the BackFill hook is used.
40 If non-layered the region is cleared.
42 INPUTS
43 rp - destination RastPort
44 xMin,yMin - upper left corner
45 xMax,YMax - lower right corner
47 RESULT
49 NOTES
51 EXAMPLE
53 BUGS
55 SEE ALSO
57 INTERNALS
59 HISTORY
60 29-10-95 digulla automatically created from
61 graphics_lib.fd and clib/graphics_protos.h
63 *****************************************************************************/
65 AROS_LIBFUNC_INIT
67 struct Rectangle r;
68 struct Hook *h = LAYERS_BACKFILL;
70 FIX_GFXCOORD(xMin);
71 FIX_GFXCOORD(yMin);
72 FIX_GFXCOORD(xMax);
73 FIX_GFXCOORD(yMax);
75 r.MinX = xMin;
76 r.MinY = yMin;
77 r.MaxX = xMax;
78 r.MaxY = yMax;
80 if (rp->Layer)
82 LockLayerRom(rp->Layer);
83 h = rp->Layer->BackFill;
86 DoHookClipRects(h, rp, &r);
88 if (rp->Layer)
90 UnlockLayerRom(rp->Layer);
93 ReturnVoid("EraseRect");
95 AROS_LIBFUNC_EXIT
97 } /* EraseRect */
99 /****************************************************************************************/
101 #undef LayersBase
103 /****************************************************************************************/