Rename GP_Pixel_Access to GP_GetPutPixel
[gfxprim.git] / pylib / pixeltypes.py
blob4762255061245abf7d0e74c5d3b1b18a29e08ada
2 # pixeltypes.py - module defining known PixelTypes
3 #
6 # 2011 - Tomas Gavenciak <gavento@ucw.cz>
8 # Every call to PixelType defines one new GP_PixelType, order defines
9 # the numbering. Undefined type is defined automatically.
10 # No other functionality than PixelType() should be defined here.
12 # This file is sourced by all the generating scripts.
13 # Moreover, the generated files are sourced by almost all Gfxprim sources,
14 # a complete recompilation is required after any change.
18 # Standard RGB types
21 PixelType(name='RGBx8888', size=32, chanslist=[
22 ('R', 0, 8),
23 ('G', 8, 8),
24 ('B', 16, 8)])
27 PixelType(name='RGBA8888', size=32, chanslist=[
28 ('R', 0, 8),
29 ('G', 8, 8),
30 ('B', 16, 8),
31 ('A', 24, 8)])
34 PixelType(name='RGB888', size=24, chanslist=[
35 ('R', 0, 8),
36 ('G', 8, 8),
37 ('B', 16, 8)])
40 PixelType(name='RGB565', size=16, chanslist=[
41 ('R', 0, 5),
42 ('G', 5, 6),
43 ('B', 11, 5)])
46 # Palette types
49 PixelType(name='P2', size=2, bit_endian='LE', chanslist=[
50 ('P', 0, 2)])
53 PixelType(name='P4', size=4, bit_endian='LE', chanslist=[
54 ('P', 0, 4)])
57 PixelType(name='P8', size=8, bit_endian='LE', chanslist=[
58 ('P', 0, 8)])
61 # Gray-only pixel types
64 PixelType(name='V1', size=1, bit_endian='LE', chanslist=[
65 ('V', 0, 1)])
68 PixelType(name='V2', size=2, bit_endian='LE', chanslist=[
69 ('V', 0, 2)])
72 PixelType(name='V4', size=4, bit_endian='LE', chanslist=[
73 ('V', 0, 4)])
76 PixelType(name='V8', size=8, bit_endian='LE', chanslist=[
77 ('V', 0, 8)])
81 # Experiments
84 PixelType(name='VA12', size=4, bit_endian='BE', chanslist=[
85 ('A', 1, 2),
86 ('V', 3, 1)])