New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / graphics / setbpen.c
blob1fa1e491cc63462dda170343ab093f76c3815c02
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$ $Log
5 Desc: Graphics function SetBPen()
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, SetBPen,
20 /* SYNOPSIS */
21 AROS_LHA(struct RastPort *, rp, A1),
22 AROS_LHA(ULONG , pen, D0),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 58, Graphics)
27 /* FUNCTION
29 INPUTS
31 RESULT
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
41 INTERNALS
43 HISTORY
44 29-10-95 digulla automatically created from
45 graphics_lib.fd and clib/graphics_protos.h
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
50 AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
52 struct gfx_driverdata *dd;
54 if (OBTAIN_DRIVERDATA(rp, GfxBase))
57 struct TagItem col_tags[]=
59 { aHidd_GC_Background, 0},
60 { TAG_DONE }
63 col_tags[0].ti_Data = rp->BitMap ? BM_PIXEL(rp->BitMap, pen & PEN_MASK) : pen;
65 dd = GetDriverData(rp);
66 if (dd)
68 OOP_SetAttrs( dd->dd_GC, col_tags );
70 RELEASE_DRIVERDATA(rp, GfxBase);
73 /* Do it after the driver to allow it to inspect the previous value */
74 rp->BgPen = pen;
75 rp->linpatcnt = 15;
77 AROS_LIBFUNC_EXIT
78 } /* SetBPen */