Example #1
0
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()
Example #2
0
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)
Example #3
0
 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)