make auto-filename feature available to document.document too
[PyX/mjg.git] / manual / bitmap.py
blob621f8f0578e3bb4014edb158beb07e3d3106b7f3
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 = bitmap.bitmap(0, 1, image_bw, height=0.8)
8 bitmap_rgb = bitmap.bitmap(0, 0, image_rgb, height=0.8)
10 c = canvas.canvas()
11 c.insert(bitmap_bw)
12 c.insert(bitmap_rgb)
13 c.writeEPSfile("bitmap")
14 c.writePDFfile("bitmap")