Exemple #1
0
 def __init__(self, *args, **kwargs):
     FigureCanvasWxAggMod.__init__(self, *args, **kwargs)
     if FigureCanvasWxAggModGL.glcanvas is None:
         win = wx.GetApp().TopWindow
         glcanvas = MyGLCanvas(win)
         FigureCanvasWxAggModGL.glcanvas = glcanvas
         glcanvas.SetMinSize((2, 2))
         glcanvas.SetMaxSize((2, 2))
         # self.SetSizer(wx.BoxSizer(wx.HORIZONTAL))
         win.GetSizer().Add(glcanvas)
         win.Layout()
         glcanvas.Refresh()
Exemple #2
0
 def __init__(self, *args, **kwargs):
     FigureCanvasWxAggMod.__init__(self, *args, **kwargs)
     if FigureCanvasWxAggModGL.glcanvas is None:
         win = wx.GetApp().TopWindow 
         glcanvas = load_glcanvas()(win)
         FigureCanvasWxAggModGL.glcanvas = glcanvas
         glcanvas.SetMinSize((2,2))
         glcanvas.SetMaxSize((2,2))
         #self.SetSizer(wx.BoxSizer(wx.HORIZONTAL))
         win.GetSizer().Add(glcanvas)
         win.Layout()
         glcanvas.Refresh()
Exemple #3
0
    def draw_artist(self, drawDC=None, alist=None):
        if alist is None: alist = []
        gl_obj = [a for a in alist if hasattr(a, 'is_gl')]
        
        for o in gl_obj: o.is_last =  False
        if len(gl_obj) > 0:
            gl_obj[-1].is_last =  True
            self.renderer._k_globj =   0
            self.renderer._num_globj =  len(gl_obj)
            self.renderer.no_update_id()
#            self.renderer.no_lighting = no_lighting
            self._update_hl_color()            
            FigureCanvasWxAggModGL.glcanvas._artist_mask = alist

        v =  FigureCanvasWxAggMod.draw_artist(self, drawDC=drawDC, alist=alist)
#        self.renderer.no_lighting = False
        return v
    def draw_artist(self, drawDC=None, alist=None):
        if alist is None: alist = []
        gl_obj = [a for a in alist if hasattr(a, 'is_gl')]
        
        for o in gl_obj: o.is_last =  False
        if len(gl_obj) > 0:
            gl_obj[-1].is_last =  True
            self.renderer._k_globj =   0
            self.renderer._num_globj =  len(gl_obj)
            self.renderer.no_update_id()
#            self.renderer.no_lighting = no_lighting
            self._update_hl_color()            
            FigureCanvasWxAggModGL.glcanvas._artist_mask = alist

        v =  FigureCanvasWxAggMod.draw_artist(self, drawDC=drawDC, alist=alist)
#        self.renderer.no_lighting = False
        return v
Exemple #5
0
 def _onSize(self, evt=None, nocheck=False):
     FigureCanvasWxAggMod._onSize(self, evt=evt, nocheck=nocheck)
Exemple #6
0
 def _onPaint(self, evt):
     #        self.glcanvas.OnPaint(evt)
     #        evt.Skip()
     FigureCanvasWxAggMod._onPaint(self, evt)
Exemple #7
0
 def draw(self, *args, **kargs):
     self._update_hl_color()
     return FigureCanvasWxAggMod.draw(self, *args, **kargs)
Exemple #8
0
 def _onSize(self, evt=None, nocheck=False):
     FigureCanvasWxAggModGL.glcanvas._hittest_map_update = True
     FigureCanvasWxAggMod._onSize(self, evt=evt, nocheck=nocheck)
Exemple #9
0
 def _onSize(self, evt=None, nocheck=False):
     FigureCanvasWxAggMod._onSize(self, evt = evt, nocheck = nocheck)
Exemple #10
0
    def _onPaint(self, evt):
#        self.glcanvas.OnPaint(evt)
#        evt.Skip()
        FigureCanvasWxAggMod._onPaint(self, evt)
Exemple #11
0
 def draw(self, *args, **kargs):
     self._update_hl_color()
     return FigureCanvasWxAggMod.draw(self,  *args, **kargs)