Made the main window a custom class. The subclass currently tests setting an
[AROS.git] / rom / graphics / initarea.c
blob71823a2d9ce543c8b1eddad38b84b57a10c899ac
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function InitArea()
6 Lang: english
7 */
8 #include <exec/types.h>
9 #include <graphics/rastport.h>
10 #include "graphics_intern.h"
12 /*****************************************************************************
14 NAME */
15 #include <proto/graphics.h>
17 AROS_LH3(void, InitArea,
19 /* SYNOPSIS */
20 AROS_LHA(struct AreaInfo *, areainfo , A0),
21 AROS_LHA(void * , buffer , A1),
22 AROS_LHA(WORD , maxvectors, D0),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 47, Graphics)
27 /* FUNCTION
28 This function initializes an areainfo structure. The size of the
29 passed pointer to the buffer should be 5 times as large as
30 maxvectors (in bytes).
32 INPUTS
33 areainfo - pointer to AreaInfo structure to be initialized
34 buffer - pointer to free memory to collect vectors
35 maxvectors - maximum number of vectors the buffer can hold.
37 RESULT
38 Areainfo structure initialized such that it will hold the vectors
39 created by AreaMove, AreaDraw and AreaEllipse (AreaCircle).
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
48 AreaDraw(), AreaMove(), AreaEllipse(), AreaCircle(), graphics/rastport.h
50 INTERNALS
52 HISTORY
54 *****************************************************************************/
56 AROS_LIBFUNC_INIT
58 areainfo->VctrTbl = buffer;
59 areainfo->VctrPtr = buffer;
60 areainfo->FlagTbl = (BYTE *)(((IPTR)buffer)+(2*sizeof(WORD)*maxvectors));
61 areainfo->FlagPtr = (BYTE *)(((IPTR)buffer)+(2*sizeof(WORD)*maxvectors));
62 areainfo->Count = 0;
63 areainfo->MaxCount = maxvectors;
65 AROS_LIBFUNC_EXIT
66 } /* InitArea */