def to_ipe( *args, **kargs ): #from math import * #al, th = drawgl.gl.alpha * pi / 180, drawgl.gl.theta * pi / 180 #als = ( al, -al, al + pi / 2, al - pi / 2 ) #ths = ( th, -th, th + pi / 2, th - pi / 2 ) #for ai, al in enumerate( als ): # for ti, th in enumerate( ths ): # drawipe.setup( al, th, drawgl.gl.dist ) # drawipe.clear() # drawipe.group() # drawipe( v1, style = 'line' ) # drawipe( v2, style = 'line' ) # drawipe( v3, style = 'line' ) # drawipe.save( '/tmp/out_%s_%s.ipe' % ( ai, ti ) ) #for i in xrange( 1,9 ): # getattr( drawipe, 'setup_drawgl' + str( i ) )( drawgl ) # drawipe.clear() # drawipe.group() # drawipe( vo ) # drawipe.save( '/tmp/out%s.ipe' % i ) drawipe.setup_drawgl( drawgl ) drawipe.clear() drawipe.group() drawipe( vo ) drawipe.save( '/tmp/out.ipe' )
def save2ipe(*args): from draw_ipe import drawipe i = 0 fname = '/tmp/out_%s.ipe' while os.path.exists(fname % i): i += 1 fname = fname % i print 'saving to %s...' % fname drawipe.setup_drawgl(drawgl) draw_with(drawipe) drawipe.save(fname)
def save2ipe( *args ): from draw_ipe import drawipe i = 0 fname = '/tmp/out_%s.ipe' while os.path.exists( fname % i ): i += 1 fname = fname % i print 'saving to %s...' % fname drawipe.setup_drawgl( drawgl ) draw_with( drawipe ) drawipe.save( fname )