tools/genmodule: Fix error in tests/clib/execl; should also fix gcc
[AROS.git] / rom / graphics / setsoftstyle.c
blob9c541e17f94e087b769109724f8856381352cba3
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function SetSoftStyle()
6 Lang: English
7 */
9 /*****************************************************************************
11 NAME */
12 #include <graphics/rastport.h>
13 #include <proto/graphics.h>
15 AROS_LH3(ULONG, SetSoftStyle,
17 /* SYNOPSIS */
18 AROS_LHA(struct RastPort *, rp , A1),
19 AROS_LHA(ULONG , style , D0),
20 AROS_LHA(ULONG , enable, D1),
22 /* LOCATION */
23 struct GfxBase *, GfxBase, 15, Graphics)
25 /* FUNCTION
27 Set the style of the current font. Only those bits set in 'enable' are
28 affected.
30 INPUTS
32 rp -- pointer to rastport
33 style -- the style the font should have
34 enable -- mask for style bits
36 RESULT
38 The style bits used hereinafter (the font may not support all the styles
39 you wish to set). Note that this is possibly more style bits than you
40 affected by calling SetSoftStyle() as a font may have intrinsic style
41 bits set.
43 NOTES
45 EXAMPLE
47 BUGS
49 SEE ALSO
51 AskSoftStyle(), graphics/text.h
53 INTERNALS
55 HISTORY
57 24.7.98 SDuvan implemented
59 *****************************************************************************/
61 AROS_LIBFUNC_INIT
63 ULONG realEnable = enable & AskSoftStyle(rp);
65 rp->AlgoStyle = ((~realEnable & rp->AlgoStyle) | (realEnable & style));
67 return rp->AlgoStyle | rp->Font->tf_Style;
69 AROS_LIBFUNC_EXIT
70 } /* SetSoftStyle */