Ejemplo n.º 1
0
 def __init__(self, im, renderer):
     """
     Initialize with a gd image
     """
     GraphicsContextBase.__init__(self)
     self.im = im
     self.renderer = renderer
Ejemplo n.º 2
0
 def __init__(self, renderer):
     GraphicsContextBase.__init__(self)
     self.renderer = renderer
     self.ctx = cairo.Context()
     # default is 0.1, raise value to increase performance
     # (and lower quality)
     self.ctx.set_tolerance(0.5)
Ejemplo n.º 3
0
 def __init__(self, im, renderer):
     """
     Initialize with a gd image
     """
     GraphicsContextBase.__init__(self)
     self.im = im
     self.renderer = renderer
Ejemplo n.º 4
0
    def __init__(self, bitmap, renderer):
        GraphicsContextBase.__init__(self)
        #assert self.Ok(), "wxMemoryDC not OK to use"
        DEBUG_MSG("__init__()", 1, self)

        dc, gfx_ctx = self._cache.get(bitmap, (None, None))
        if dc is None:
            dc = wx.MemoryDC()
            dc.SelectObject(bitmap)
            gfx_ctx = wx.GraphicsContext.Create(dc)
            gfx_ctx._lastcliprect = None
            self._cache[bitmap] = dc, gfx_ctx

        self.bitmap = bitmap
        self.dc = dc
        self.gfx_ctx = gfx_ctx
        self._pen = wx.Pen('BLACK', 1, wx.SOLID)
        gfx_ctx.SetPen(self._pen)
        self._style = wx.SOLID
        self.renderer = renderer
 def __init__(self):
     GraphicsContextBase.__init__(self)
     _macosx.GraphicsContext.__init__(self)
Ejemplo n.º 6
0
 def __init__(self, renderer):
     GraphicsContextBase.__init__(self)
     self.renderer = renderer
     self.gdkGC    = gtk.gdk.GC(renderer.gdkDrawable)
     self._cmap    = renderer._cmap
Ejemplo n.º 7
0
 def __init__(self, renderer):
     GraphicsContextBase.__init__(self)
     self.renderer = renderer
Ejemplo n.º 8
0
 def __init__(self, renderer):
     GraphicsContextBase.__init__(self)
     self.renderer = renderer
     self.ctx = cairo.Context()
Ejemplo n.º 9
0
 def __init__(self, renderer):
     GraphicsContextBase.__init__(self)
     self.renderer = renderer
Ejemplo n.º 10
0
 def __init__(self, renderer):
     GraphicsContextBase.__init__(self)
     self.renderer = renderer
     self.ctx = cairo.Context()
Ejemplo n.º 11
0
 def __init__(self, file):
     GraphicsContextBase.__init__(self)
     self._fillcolor = (0.0, 0.0, 0.0)
     self.file = file
     self.parent = None
Ejemplo n.º 12
0
 def __init__(self, renderer):
     GraphicsContextBase.__init__(self)
     self.renderer = renderer
     # self.ctx = cairo.Context (surface)
     self.ctx = renderer.ctx
Ejemplo n.º 13
0
 def __init__(self):
     GraphicsContextBase.__init__(self)
     _ios.GraphicsContext.__init__(self)
Ejemplo n.º 14
0
    def __init__(self, file):
	GraphicsContextBase.__init__(self)
	self._fillcolor = (0.0, 0.0, 0.0)
	self.file = file
	self.parent = None
Ejemplo n.º 15
0
 def __init__(self, gdkGC, renderer):
     GraphicsContextBase.__init__(self)
     self.gdkGC = gdkGC
     self.renderer = renderer