properly set the id of the pattern object; delete old commented code
[PyX/mjg.git] / examples / bitmap / minimal.py
blob1fac459533ff2bb1816c701a3d2cb169989d331e
1 # This example is identical to the introductory example in the
2 # bitmap section of the manual.
4 from pyx import *
6 image_bw = bitmap.image(2, 2, "L", "\0\377\377\0")
7 image_rgb = bitmap.image(3, 2, "RGB", "\77\77\77\177\177\177\277\277\277"
8 "\377\0\0\0\377\0\0\0\377")
9 bitmap_bw = bitmap.bitmap(0, 1, image_bw, height=0.8)
10 bitmap_rgb = bitmap.bitmap(0, 0, image_rgb, height=0.8)
12 c = canvas.canvas()
13 c.insert(bitmap_bw)
14 c.insert(bitmap_rgb)
15 c.writeEPSfile("minimal")
16 c.writePDFfile("minimal")