New bitmap method SetRGBConversionFunction which can be used to
[tangerine.git] / rom / graphics / initrastport.c
blobdea55c2c12c791d73d00d1e0adac6c9cbd1b9761
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$ $Log
5 Desc: Graphics function InitRastPort()
6 Lang: english
7 */
8 #include "graphics_intern.h"
9 #include <graphics/rastport.h>
10 #include <proto/exec.h>
12 #include "gfxfuncsupport.h"
14 static const struct RastPort defaultRastPort =
16 NULL, /* Layer */
17 NULL, /* BitMap */
18 NULL, /* AreaPtrn */
19 NULL, /* TmpRas */
20 NULL, /* AreaInfo */
21 NULL, /* GelsInfo */
22 ~0, /* Mask */
23 ~0, /* FgPen */
24 0, /* BgPen */
25 ~0, /* AOlPen */
26 JAM2, /* DrawMode */
27 0, /* AreaPtSz */
28 0, /* linpatcnt */
29 0, /* dummy */
30 0, /* Flags */
31 ~0, /* LinePtrn */
32 0,0, /* cp_x, cp_y */
33 { 0,0,0,0, 0,0,0,0 }, /* minterms[] */
34 0, /* PenWidth */
35 0, /* PenHeight */
36 NULL, /* Font */
37 0, /* AlgoStyle */
38 0, /* TxFlags */
39 0, /* TxHeight */
40 0, /* TxWidth */
41 0, /* TxBaseline */
42 0, /* TxSpacing */
43 NULL, /* RP_User */
44 { 0,0 }, /* longreserved */
45 { 0,0,0,0, 0,0,0 }, /* wordreserved */
46 { 0,0,0,0, 0,0,0,0 }, /* reserved */
49 /*****************************************************************************
51 NAME */
52 #include <proto/graphics.h>
54 AROS_LH1(BOOL, InitRastPort,
56 /* SYNOPSIS */
57 AROS_LHA(struct RastPort *, rp, A1),
59 /* LOCATION */
60 struct GfxBase *, GfxBase, 33, Graphics)
62 /* FUNCTION
63 Initializes a RastPort structure.
65 INPUTS
66 rp - The RastPort to initialize.
68 RESULT
69 TRUE if the RastPort was successfuly initialized and FALSE
70 otherwise.
72 NOTES
73 You must call DeinitRastPort() before you free the structure.
75 AROS defines this function with a return value which you should
76 check.
78 EXAMPLE
80 BUGS
82 SEE ALSO
84 INTERNALS
86 HISTORY
87 29-10-95 digulla automatically created from
88 graphics_lib.fd and clib/graphics_protos.h
90 *****************************************************************************/
92 AROS_LIBFUNC_INIT
93 AROS_LIBBASE_EXT_DECL(struct GfxBase *,GfxBase)
95 CopyMem ((UBYTE *)&defaultRastPort, rp, sizeof (struct RastPort));
96 RP_BACKPOINTER(rp) = rp; /* Mark rastport as valid (no manual clone) */
98 SetFont (rp, GfxBase->DefaultFont);
100 return TRUE;
102 AROS_LIBFUNC_EXIT
104 } /* InitRastPort */