xine-lib: xine-lib-1.2.13/src/post/goom/goom_graphic.h Source File

xine-lib 1.2.13-20230125hg15249

goom_graphic.h
Go to the documentation of this file.
1#ifndef GRAPHIC_H
2#define GRAPHIC_H
3
4 typedef unsigned int Uint;
5
6 typedef struct
7{
8 unsigned short r, v, b;
9}
10 Color;
11
12extern const Color BLACK;
13extern const Color WHITE;
14extern const Color RED;
15extern const Color BLUE;
16extern const Color GREEN;
17extern const Color YELLOW;
18extern const Color ORANGE;
19extern const Color VIOLET;
20
21
22#ifdef COLOR_BGRA
23
24#define B_CHANNEL 0xFF000000
25#define G_CHANNEL 0x00FF0000
26#define R_CHANNEL 0x0000FF00
27#define A_CHANNEL 0x000000FF
28#define B_OFFSET 24
29#define G_OFFSET 16
30#define R_OFFSET 8
31#define A_OFFSET 0
32
33typedef union _PIXEL {
34 struct {
35 unsigned char b;
36 unsigned char g;
37 unsigned char r;
38 unsigned char a;
39 } channels;
40 unsigned int val;
41 unsigned char cop[4];
42} Pixel;
43
44#else
45
46#define A_CHANNEL 0xFF000000
47#define R_CHANNEL 0x00FF0000
48#define G_CHANNEL 0x0000FF00
49#define B_CHANNEL 0x000000FF
50#define A_OFFSET 24
51#define R_OFFSET 16
52#define G_OFFSET 8
53#define B_OFFSET 0
54
55 typedef union _PIXEL {
56 struct {
57 unsigned char a;
58 unsigned char r;
59 unsigned char g;
60 unsigned char b;
61 } channels;
62 unsigned int val;
63 unsigned char cop[4];
64} Pixel;
65
66#endif /* COLOR_BGRA */
67
68/*
69inline void setPixelRGB (Pixel * buffer, Uint x, Uint y, Color c);
70inline void getPixelRGB (Pixel * buffer, Uint x, Uint y, Color * c);
71*/
72
73
74#endif /* GRAPHIC_H */
VIOLET
const Color VIOLET
Definition graphic.c:10
BLUE
const Color BLUE
Definition graphic.c:7
YELLOW
const Color YELLOW
Definition graphic.c:8
Uint
unsigned int Uint
Definition goom_graphic.h:4
RED
const Color RED
Definition graphic.c:5
Pixel
union _PIXEL Pixel
WHITE
const Color WHITE
Definition graphic.c:4
ORANGE
const Color ORANGE
Definition graphic.c:9
BLACK
const Color BLACK
Definition graphic.c:3
GREEN
const Color GREEN
Definition graphic.c:6
Color
Definition goom_graphic.h:7
Color::b
unsigned short b
Definition goom_graphic.h:8
_PIXEL
Definition goom_graphic.h:55
_PIXEL::r
unsigned char r
Definition goom_graphic.h:58
_PIXEL::val
unsigned int val
Definition goom_graphic.h:62
_PIXEL::g
unsigned char g
Definition goom_graphic.h:59
_PIXEL::channels
struct _PIXEL::@47 channels
_PIXEL::a
unsigned char a
Definition goom_graphic.h:57
_PIXEL::b
unsigned char b
Definition goom_graphic.h:60
_PIXEL::cop
unsigned char cop[4]
Definition goom_graphic.h:63
v
uint32_t v
Definition utils.c:1157