Example #1
0
File: julia.py Project: uhwang/vgl
def save_cairo(fname, gbox, dpi):
    global wid, hgt
    wid = int(frm.get_pdom_wid() * dpi)
    hgt = int(frm.get_pdom_hgt() * dpi)

    dev_img = DeviceCairo(fname, gbox, dpi)
    dev_img.fill_black()
    dev_img.set_plot(frm)
    julia(dev_img)
    #dev_img.set_pixel(100,100, (255,0,0))
    #dev_img.set_pixel(102,100, (0,255,0))
    #dev_img.set_pixel(104,100, (0,0,255))
    dev_img.close()
Example #2
0
def save_cairo(fname, gbox, dpi):
	global dev_ani, movie
	movie = False
	dev_img = DeviceCairo(fname, gbox, dpi)
	dev_img.fill_black()
	dev_img.set_plot(frm_x2)
	run_rand_tree(dev_img)
	if movie:
		print(len(clips))
		dev_ani = DeviceCairoAnimation("ftree2.mp4", dev_img, 0,0)
		video = concatenate_videoclips(clips, method='compose')
		#video.write_videofile("ftree01.mp4", fps=30)
		video.write_gif("ftree2.gif", fps=30)
	dev_img.close()