Copyright clean-up (part 1):
[AROS.git] / test / graphics / getcybermapattr.c
blob271e102e603a73a6524ab08b73a043548d1b6308
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <cybergraphx/cybergraphics.h>
8 #include <proto/intuition.h>
9 #include <proto/cybergraphics.h>
11 #include <stdio.h>
12 #include <string.h>
14 #define NUM_PIXFMT 14
16 static char *pixfmt_str[14]=
18 "LUT8",
19 "RGB15",
20 "BGR15",
21 "RGB15PC",
22 "BGR15PC",
23 "RGB16",
24 "BGR16",
25 "RGB16PC",
26 "BGR16PC",
27 "RGB24",
28 "BGR24",
29 "ARGB32",
30 "BGRA32",
31 "RGBA32"
34 int main(void)
36 struct Screen *scr = IntuitionBase->ActiveScreen;
38 if (scr)
40 struct BitMap *bm = scr->RastPort.BitMap;
41 LONG pixfmt;
43 pixfmt = GetCyberMapAttr(bm, CYBRMATTR_PIXFMT);
45 printf("Pixel Format: #%ld (%s)\n",
46 (long)pixfmt,
47 ((pixfmt >= 0) && (pixfmt < NUM_PIXFMT)) ? pixfmt_str[pixfmt] : "<unknown>");
51 return 0;