def draw(self): newsize = (self.w(), self.h()) if self._oldsize != newsize: self._oldsize = newsize self._source.resize(newsize) self._source.draw() t1, t2, w, h = self._source.figure.bbox.get_bounds() Fltk.fl_draw_image(self._source.buffer_rgba(), 0, 0, int(w), int(h), 4, 0)
def draw(self): newsize=(self.w(),self.h()) if(self._oldsize !=newsize): self._oldsize =newsize self._source.resize(newsize) self._source.draw() t1,t2,w,h = self._source.figure.bbox.get_bounds() Fltk.fl_draw_image(self._source.buffer_rgba(),0,0,int(w),int(h),4,0)
def blit(self,bbox=None): if bbox is None: t1,t2,w,h = self._source.figure.bbox.bounds else: t1o,t2o,wo,ho = self._source.figure.bbox.bounds t1,t2,w,h = bbox.bounds x,y=int(t1),int(t2) Fltk.fl_draw_image(self._source.buffer_rgba(),x,y,int(w),int(h),4,int(wo)*4)
def blit(self,bbox=None): if bbox is None: t1,t2,w,h = self._source.figure.bbox.get_bounds() else: t1o,t2o,wo,ho = self._source.figure.bbox.get_bounds() t1,t2,w,h = bbox.get_bounds() x,y=int(t1),int(t2) Fltk.fl_draw_image(self._source.buffer_rgba(x,y),x,y,int(w),int(h),4,int(wo)*4)