r4493@vps: verhaegs | 2007-04-19 14:44:00 -0400
[AROS.git] / rom / graphics / initbitmap.c
blob52d65d126050da067f898c5c5eecfb2692bcdce3
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: English
7 */
9 #include <proto/graphics.h>
11 /*****************************************************************************
13 NAME */
15 #include <graphics/gfx.h>
17 AROS_LH4I(VOID, InitBitMap,
19 /* SYNOPSIS */
21 AROS_LHA(struct BitMap *, bm, A0),
22 AROS_LHA(BYTE , depth, A1),
23 AROS_LHA(UWORD , width, D0),
24 AROS_LHA(UWORD , height, D1),
26 /* LOCATION */
28 struct Library *, GfxBase, 65, Graphics)
30 /* FUNCTION
32 Initialize BitMap structure. A bitmap MUST be initialized before it's
33 used in any (other) graphics library function.
35 INPUTS
37 bm -- pointer to BitMap structure
38 depth -- number of bitplanes
39 width -- width in pixels of this bitmap
40 height -- height in pixels of this bitmap
42 RESULT
44 NOTES
46 The Planes[] is not affected and must be set up the caller.
48 EXAMPLE
50 BUGS
52 SEE ALSO
54 <graphics/gfx.h>
56 INTERNALS
58 HISTORY
60 ******************************************************************************/
63 AROS_LIBFUNC_INIT
65 bm->Depth = depth;
66 bm->Rows = height;
67 bm->Flags = 0;
68 bm->pad = 0;
69 bm->BytesPerRow = ((width + 15) >> 3) & ~0x1;
71 AROS_LIBFUNC_EXIT
72 } /* InitBitMap */