Exemplo n.º 1
0
 def write_paper(self, a_file, a_format):
     factor = 2  # have greater size to have good freetype rendering.
     _width = factor * self.m_width
     _height = factor * self.m_height
     clear_color = inlib.colorf_white()
     exlib.sg_write_paper(inlib.get_cout(),self.m_gl2ps_mgr,self.m_zb_mgr,\
                          clear_color.r(),clear_color.g(),clear_color.b(),clear_color.a(),\
                          self.m_sep,_width,_height,a_file,a_format)
     del clear_color
Exemplo n.º 2
0
if args.vis_mode == "offscreen":
    import exlib_offscreen as exlib

    all_sep = create_all_sep(sep)

    gl2ps_mgr = exlib.sg_gl2ps_manager()
    zb_mgr = inlib.sg_zb_manager()
    factor = 2  # have greater size to have good freetype rendering.
    _width = factor * width
    _height = factor * height
    clear_color = inlib.colorf_white()
    file = 'out_two_cubes.ps'
    format = "INZB_PS"
    exlib.sg_write_paper(inlib.get_cout(),gl2ps_mgr,zb_mgr,\
                         clear_color.r(),clear_color.g(),clear_color.b(),clear_color.a(),\
                         all_sep,_width,_height,file,format)
    file = 'out_two_cubes.png'
    format = "INZB_PNG"
    exlib.sg_write_paper(inlib.get_cout(),gl2ps_mgr,zb_mgr,\
                         clear_color.r(),clear_color.g(),clear_color.b(),clear_color.a(),\
                         all_sep,_width,_height,file,format)
    del clear_color
    del zb_mgr
    del gl2ps_mgr
    del all_sep

elif args.vis_mode == "client":

    host = args.vis_host
    port = int(args.vis_port)