graph style + data reorganization completed
[PyX/mjg.git] / test / functional / test_bitmap.py
blob85fc81c3a65c59ca647e14c4b444edd8331f9a5d
1 import sys; sys.path.insert(0, "../..")
2 from pyx import *
4 image_bw = bitmap.image(2, 2, "L", "\0\377\377\0")
5 image_rgb = bitmap.image(3, 2, "RGB", "\77\77\77\177\177\177\277\277\277"
6 "\377\0\0\0\377\0\0\0\377")
7 bitmap_bw_stream = bitmap.bitmap(0, 1, image_bw, height=0.8)
8 bitmap_rgb_stream = bitmap.bitmap(0, 0, image_rgb, height=0.8)
10 bitmap_bw_storestring = bitmap.bitmap(2, 1, image_bw, height=0.8, storedata=1)
11 bitmap_rgb_storestring = bitmap.bitmap(2, 0, image_rgb, height=0.8, storedata=1)
13 bitmap_bw_storearray = bitmap.bitmap(4, 1, image_bw, height=0.8, storedata=1, maxstrlen=2)
14 bitmap_rgb_storearray = bitmap.bitmap(4, 0, image_rgb, height=0.8, storedata=1, maxstrlen=2)
16 c = canvas.canvas()
17 c.insert(bitmap_bw_stream)
18 c.insert(bitmap_rgb_stream)
19 c.insert(bitmap_bw_stream)
20 c.insert(bitmap_rgb_stream)
21 c.insert(bitmap_bw_storestring)
22 c.insert(bitmap_rgb_storestring)
23 c.insert(bitmap_bw_storestring)
24 c.insert(bitmap_rgb_storestring)
25 c.insert(bitmap_bw_storearray)
26 c.insert(bitmap_rgb_storearray)
27 c.insert(bitmap_bw_storearray)
28 c.insert(bitmap_rgb_storearray)
29 c.writeEPSfile("test_bitmap", paperformat="a4")