summaryrefslogtreecommitdiff
path: root/src/cmd2d.h
blob: a3866b599aac8647c0b1bc54e4452f6961302794 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#ifndef __CMD2D_H__
#define __CMD2D_H__

/*
 * commands the 2d microcode offers
 */
/* $XFree86$ */

#define CMD_SETUP					32
#define CMD_SET_PIX_REG				2
#define CMD_RECT_SOLID				1
#define CMD_RECT_SOLID_ROP			41
#define CMD_SET_FGCOLOR				50
#define CMD_DD_RECT_SOLID			38
#define CMD_SCREEN_BLT				12
#define CMD_DD_SCREEN_BLT			37
#define CMD_BITBLT_MS_COLOR			7
#define CMD_BITBLT_MS_MONO			22
#define CMD_LOAD_COLOR_BRUSH		5
#define CMD_RECT_COLOR_BRUSH		6 
#define CMD_RECT_COLOR_BRUSH_ROP	24
#define CMD_LOAD_MONO_BRUSH			4
#define CMD_RECT_MONO_BRUSH			3
#define CMD_RECT_MONO_BRUSH_ROP		42
#define CMD_SET_PIXEL				34
#define CMD_GET_PIXEL				9
#define CMD_LINE_SOLID				20
#define CMD_LINE_STYLE				21
#define CMD_SCAN_LINE_SOLID			15
#define CMD_BSCAN_SOLID				19
#define CMD_BSCAN_COLOR				14
#define CMD_BSCAN_MONO				13
#define CMD_ENDSCAN					18
#define CMD_SCANLINE_COLOR_BRUSH	17
#define CMD_SCANLINE_MONO_BRUSH		16
#define CMD_STRETCH_BLT				23
#define CMD_DD_STRETCH_BLT			39
#define CMD_LOAD_COLOR_TABLE		25
#define CMD_BLTDIB1					26
#define CMD_BLTDIB4					27
#define CMD_BLTDIB8					28
#define CMD_BLTRLE4					30
#define CMD_BLTRLE8					31
#define CMD_SET_PALETTE				33
#define CMD_SETCLIPPING				36
#define CMD_DRAWGLYPHS				35
#define CMD_DD_YUV2RGB				43
#define CMD_DD_YUV2RGBCk			44



/*
 * pixel formats (R: red, G: green, B: blue, I: intensity/index, A: alpha)
 *
 * <ml>: this is redundant; one should use the enums in vtypes.h.
 */

#define FMT_SOURCE					0
#define FMT_8_332_RGB				1
#define FMT_8_I						2
#define FMT_8_A						3
#define FMT_16_565_RGB				4
#define FMT_16_4444_ARGB			5
#define FMT_16_1555_ARGB			6
#define FMT_4I_565_RGB				8
#define FMT_4I_444_ARGB				9
#define FMT_4I_1555_ARGB			0xa
#define FMT_32_8888_ARGB			0xc
#define FMT_32_888_Y0CrY1Cb			0xd



/*
 * stride values for address calculation
 */

#define STRIDE0_0					0
#define STRIDE0_8					1
#define STRIDE0_9					2
#define STRIDE0_10					3
#define STRIDE0_2					4
#define STRIDE1_0					0
#define STRIDE1_4					1
#define STRIDE1_5					2
#define STRIDE1_6					3
#define STRIDE1_7					4
#define STRIDE1_10					5
#define STRIDE1_11					6
#define STRIDE1_12					7



/*
 * raster operations (S: source, D: destination, N: not)
 */

#define ROP_ALLBITS0				0
#define ROP_NOR_SD					1
#define ROP_AND_NSD					2
#define ROP_NOT_S					3
#define ROP_AND_SND					4
#define ROP_NOT_D					5
#define ROP_XOR_SD					6
#define ROP_NAND_SD					7
#define ROP_AND_SD					8
#define ROP_XNOR_SD					9
#define ROP_D						0xa
#define ROP_OR_NSD					0xb
#define ROP_S						0xc
#define ROP_OR_SND					0xd
#define ROP_OR_SD					0xe
#define ROP_ALLBITS1				0xf



/*
 * ... modes
 */

#define MODE_TRANSPARENT			0
#define MODE_OPAQUE					1



/*
 * 8x8 predefined monochrome brushes
 */

#define HS_HORIZONTAL				0
#define HS_VERTICAL					1
#define HS_FDIAGONAL				2
#define HS_BDIAGONAL				3
#define HS_CROSS					4
#define HS_DIAGCROSS				5



/*
 * pen styles for styled lined
 */

#define PS_DASH						1
#define PS_DOT						2
#define PS_DASHDOT					3
#define PS_DASHDOTDOT				4

/* end of __CMD2D_H__ */
#endif