def test2(): vcr = VCRCanvas() f = open('test1.vcr', 'r') vcr.load(f) f.close() import p4vasp.piddle.piddlePS as piddlePS canvas2 = piddlePS.PSCanvas() vcr.playBack(canvas2) canvas2.flush()
def test1(): import p4vasp.piddle.piddlePS as piddlePS canvas = piddlePS.PSCanvas() vcr = VCRCanvas(canvas) vcr.defaultLineWidth = 3 vcr.drawLine(10, 10, 100, 30, color=red) vcr.drawString("This is a test!", 25, 50, Font(size=24)) vcr.flush() f = open('test1.vcr', 'w') vcr.save(f)
def exportEPS(self, w, data=None): import p4vasp.piddle.piddlePS as piddlePS c = piddlePS.PSCanvas(size=(w.page_size_x, w.page_size_y)) w.render(c, data) c.save(self.file)