2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Graphics function SetDrMd()
8 #include "graphics_intern.h"
9 #include "gfxfuncsupport.h"
10 #include <proto/oop.h>
12 /*****************************************************************************
15 #include <graphics/rastport.h>
16 #include <proto/graphics.h>
18 AROS_LH2(void, SetDrMd
,
21 AROS_LHA(struct RastPort
*, rp
, A1
),
22 AROS_LHA(ULONG
, drawMode
, D0
),
25 struct GfxBase
*, GfxBase
, 59, Graphics
)
28 Set the drawing mode for lines, fills and text.
32 drawMode - see graphics/rastport.h for possible flags.
47 29-10-95 digulla automatically created from
48 graphics_lib.fd and clib/graphics_protos.h
50 *****************************************************************************/
54 struct TagItem drmd_tags
[] =
56 { aHidd_GC_ColorExpansionMode
, 0UL },
57 { aHidd_GC_DrawMode
, vHidd_GC_DrawMode_Copy
},
60 struct gfx_driverdata
*dd
;
62 if (OBTAIN_DRIVERDATA(rp
, GfxBase
))
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
);
82 OOP_SetAttrs(dd
->dd_GC
, drmd_tags
);
84 RELEASE_DRIVERDATA(rp
, GfxBase
);
87 rp
->DrawMode
= drawMode
;