Пример #1
0
def main():

    data = Data(-3, 3, -1, 10)
    fmm = FrameManager()
    frm_x2 = fmm.create(0.0, 0.0, 2, 4, data)

    gbbox = fmm.get_gbbox()

    dev_wmf = DeviceWindowsMetafile("patlin.wmf", gbbox)
    dev_wmf.set_device(frm_x2)
    test(dev_wmf)
    dev_wmf.close()

    dev_img = DeviceCairo("patlin.png", gbbox, dpi)
    dev_img.fill_white()
    dev_img.set_plot(frm_x2)
    test(dev_img)
    dev_img.close()
Пример #2
0
def main():
    from vgl import color, BBox, Frame, FrameManager, Data
    from vgl import DeviceWindowsMetafile, DeviceCairo
    #from vgl import drawfrm, symbol, drawtick, drawaxis, drawlabel

    data = Data(-3, 3, -1, 10)
    fmm = FrameManager()
    frm_x2 = fmm.create(0.0, 0.0, 4, 4, data)

    gbbox = fmm.get_gbbox()

    dev_img = DeviceCairo("patlin.png", gbbox, 100)
    dev_img.fill_white()
    dev_img.set_plot(frm_x2)
    test(dev_img)
    dev_img.close()

    dev_wmf = DeviceWindowsMetafile("patlin.wmf", gbbox)
    dev_wmf.set_device(frm_x2)
    test(dev_wmf)
    dev_wmf.close()
Пример #3
0
def save_cairo(fname, frm, gbox, dpi):
    dev_img = DeviceCairo(fname, gbox, dpi)
    dev_img.fill_white()
    dev_img.set_plot(frm)
    plot_geom(dev_img)
    dev_img.close()
Пример #4
0
Файл: x2x3.py Проект: uhwang/vgl
def save_img(fname, gbox, dpi):
	dev_img = DeviceCairo(fname, gbox, dpi)
	dev_img.fill_white()
	plot_all(dev_img)
	dev_img.close()