Documented GVF_SAVE_VAR alongside other flags, and removed a query/doubt
[AROS.git] / rom / graphics / getrgb32.c
blobffd3282b05ab284590fd157364de3e09d990e9d2
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Graphics function GetRGB32()
6 Lang: english
7 */
8 #include <graphics/view.h>
9 #include "graphics_intern.h"
11 /*****************************************************************************
13 NAME */
14 #include <proto/graphics.h>
16 AROS_LH4(void, GetRGB32,
18 /* SYNOPSIS */
19 AROS_LHA(struct ColorMap *, cm , A0),
20 AROS_LHA(ULONG , firstcolor, D0),
21 AROS_LHA(ULONG , ncolors , D1),
22 AROS_LHA(ULONG * , table , A1),
24 /* LOCATION */
25 struct GfxBase *, GfxBase, 150, Graphics)
27 /* FUNCTION
28 Fill the table with the 32 bit fractional RGB values from the
29 given colormap.
31 INPUTS
32 cm - ColorMap structure obtained via GetColorMap()
33 firstcolor - the index of first color register to get (starting with 0)
34 ncolors - the number of color registers to examine and write
35 into the table
36 table - a pointer to an array of 32 bit RGB triplets
38 RESULT
39 the ULONG pointed to by table will be filled with the 32 bit
40 fractional RGB values from the colormap
42 NOTES
43 table should point to an array of at least 3*ncolors longwords.
45 EXAMPLE
47 BUGS
49 SEE ALSO
50 GetColorMap(), FreeColorMap(), SetRGB4(), LoadRGB4()
51 LoadRGB32(), SetRGB32CM(), graphics/view.h
53 INTERNALS
54 This function depends on the ColorMap->ColorTable structure
56 HISTORY
58 *****************************************************************************/
60 AROS_LIBFUNC_INIT
62 ULONG i,n;
64 for (i = firstcolor, n = 0; i < (ncolors+firstcolor); i++ )
66 ULONG red, green, blue;
68 color_get(cm, &red, &green, &blue, i);
70 table[n++] = red;
71 table[n++] = green;
72 table[n++] = blue;
75 AROS_LIBFUNC_EXIT
77 } /* GetRGB32 */