Updates to includes for scsi & usbhardware.
[cake.git] / rom / graphics / setapen.c
blobd4224694213d940c811550ef4888d6f29760d212
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function SetAPen()
6 Lang: english
7 */
8 #include "graphics_intern.h"
9 #include <proto/oop.h>
10 #include "gfxfuncsupport.h"
12 /*****************************************************************************
14 NAME */
15 #include <graphics/rastport.h>
16 #include <proto/graphics.h>
18 AROS_LH2(void, SetAPen,
20 /* SYNOPSIS */
21 AROS_LHA(struct RastPort *, rp, A1),
22 AROS_LHA(ULONG , pen, D0),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 57, Graphics)
27 /* FUNCTION
28 Set primary pen for rastport
30 INPUTS
31 rp - RastPort
32 pen - pen number (0...255)
34 RESULT
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
44 INTERNALS
46 HISTORY
47 29-10-95 digulla automatically created from
48 graphics_lib.fd and clib/graphics_protos.h
50 *****************************************************************************/
52 AROS_LIBFUNC_INIT
54 struct gfx_driverdata *dd;
56 if (OBTAIN_DRIVERDATA(rp, GfxBase))
58 dd = GetDriverData(rp);
59 if (dd)
61 struct TagItem col_tags[]=
63 { aHidd_GC_Foreground, 0},
64 { TAG_DONE }
67 col_tags[0].ti_Data = rp->BitMap ? BM_PIXEL(rp->BitMap, pen & PEN_MASK) : pen;
68 OOP_SetAttrs( dd->dd_GC, col_tags );
71 RELEASE_DRIVERDATA(rp, GfxBase);
74 rp->FgPen = pen;
75 rp->linpatcnt = 15;
77 AROS_LIBFUNC_EXIT
78 } /* SetAPen */