Updated PCI IDs to latest snapshot.
[tangerine.git] / rom / graphics / setdrmd.c
blob09036dbeb612ac162fc6a75725057f2d2b811a3a
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$ $Log
5 Desc: Graphics function SetDrMd()
6 Lang: english
7 */
8 #include "graphics_intern.h"
9 #include "gfxfuncsupport.h"
10 #include <proto/oop.h>
12 /*****************************************************************************
14 NAME */
15 #include <graphics/rastport.h>
16 #include <proto/graphics.h>
18 AROS_LH2(void, SetDrMd,
20 /* SYNOPSIS */
21 AROS_LHA(struct RastPort *, rp, A1),
22 AROS_LHA(ULONG , drawMode, D0),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 59, Graphics)
27 /* FUNCTION
28 Set the drawing mode for lines, fills and text.
30 INPUTS
31 rp - RastPort
32 drawMode - see graphics/rastport.h for possible flags.
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 TagItem drmd_tags[] =
56 { aHidd_GC_ColorExpansionMode , 0UL },
57 { aHidd_GC_DrawMode , vHidd_GC_DrawMode_Copy },
58 { TAG_DONE }
60 struct gfx_driverdata *dd;
62 if (OBTAIN_DRIVERDATA(rp, GfxBase))
64 if (drawMode & JAM2)
66 drmd_tags[0].ti_Data = vHidd_GC_ColExp_Opaque;
68 else if (drawMode & COMPLEMENT)
70 drmd_tags[1].ti_Data = vHidd_GC_DrawMode_Invert;
72 else if ((drawMode & (~INVERSVID)) == JAM1)
74 drmd_tags[0].ti_Data = vHidd_GC_ColExp_Transparent;
77 #warning Handle INVERSVID by swapping apen and bpen ?
79 dd = GetDriverData(rp);
80 if (dd)
82 OOP_SetAttrs(dd->dd_GC, drmd_tags);
84 RELEASE_DRIVERDATA(rp, GfxBase);
87 rp->DrawMode = drawMode;
88 rp->linpatcnt = 15;
90 AROS_LIBFUNC_EXIT
91 } /* SetDrMd */