prevent double call of _cleanup, which harms usefiles (and is a bad idea in general)
[PyX.git] / examples / bitmap / minimal.py
bloba2a2db49b7f7194e58e0c430353e20882d840e23
1 from pyx import *
3 image_bw = bitmap.image(2, 2, "L", b"\0\377\377\0")
4 image_rgb = bitmap.image(3, 2, "RGB", b"\77\77\77\177\177\177\277\277\277"
5 b"\377\0\0\0\377\0\0\0\377")
6 bitmap_bw = bitmap.bitmap(0, 1, image_bw, height=0.8)
7 bitmap_rgb = bitmap.bitmap(0, 0, image_rgb, height=0.8)
9 c = canvas.canvas()
10 c.insert(bitmap_bw)
11 c.insert(bitmap_rgb)
12 c.writeEPSfile("minimal")
13 c.writePDFfile("minimal")
14 c.writeSVGfile("minimal")