Added empty bootstrap.c and its build target
[AROS.git] / workbench / libs / cgfx / invertpixelarray.c
blob86f9ad21f623d294481d03d645d44b164510893b
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
9 #include <hidd/graphics.h>
10 #include <aros/debug.h>
12 #include "cybergraphics_intern.h"
14 /*****************************************************************************
16 NAME */
17 #include <proto/cybergraphics.h>
19 AROS_LH5(ULONG, InvertPixelArray,
21 /* SYNOPSIS */
22 AROS_LHA(struct RastPort *, rp , A1),
23 AROS_LHA(UWORD , destx , D0),
24 AROS_LHA(UWORD , desty , D1),
25 AROS_LHA(UWORD , width , D2),
26 AROS_LHA(UWORD , height , D3),
28 /* LOCATION */
29 struct Library *, CyberGfxBase, 24, Cybergraphics)
31 /* FUNCTION
32 Inverts each pixel in rectangular portion of a RastPort, i.e. applies
33 a NOT operation to each bit of pixel data.
35 INPUTS
36 rp - the RastPort to write to.
37 destx, desty - top-lefthand corner of portion of RastPort to invert.
38 width, height - size of the area to invert.
40 RESULT
41 count - the number of pixels inverted.
43 NOTES
45 EXAMPLE
47 BUGS
49 SEE ALSO
51 INTERNALS
53 *****************************************************************************/
55 AROS_LIBFUNC_INIT
57 /* This is cybergraphx. We only work wih HIDD bitmaps */
58 if (!IS_HIDD_BM(rp->BitMap))
60 D(bug("!!!!! Trying to use CGFX call on non-hidd bitmap "
61 "in InvertPixelArray() !!!\n"));
62 return 0;
65 return (LONG)FillRectPenDrMd(rp, destx, desty, destx + width - 1,
66 desty + height - 1, 0xFF, vHidd_GC_DrawMode_Invert, TRUE);
68 AROS_LIBFUNC_EXIT
69 } /* InvertPixelArray */