示例#1
0
文件: gl.py 项目: enthought/enable
    def _create_gc(self, size, pix_format=None):
        """ Create a GraphicsContext instance.
        """
        from pyglet.gl import Context

        gc = GraphicsContext((size[0] + 1, size[1] + 1))
        self._pyglet_gl_context = Context()
        gc.gl_init()
        gc.translate_ctm(0.5, 0.5)
        return gc
示例#2
0
文件: gl.py 项目: pingleewu/ShareRoot
    def _create_gc(self, size, pix_format=None):
        """ Create a GraphicsContext instance.
        """
        from pyglet.gl import Context

        gc = GraphicsContext((size[0] + 1, size[1] + 1))
        self._pyglet_gl_context = Context()
        gc.gl_init()
        gc.translate_ctm(0.5, 0.5)
        return gc
示例#3
0
 def _create_gc(self, size, pix_format=None):
     """ Create a GraphicsContext instance.
     """
     gc = GraphicsContext(
         (size[0] + 1, size[1] + 1),
         base_pixel_scale=self.base_pixel_scale,
     )
     self._fake_pyglet_context = FakePygletContext()
     gc.gl_init()
     gc.translate_ctm(0.5, 0.5)
     return gc