Example #1
0
 def with_canvas(self, proc):
     hadj, vadj = self._gtk_adjustments()
     clip = rect_sized((hadj.value, vadj.value), self.size)
     #		canvas = Canvas._from_gdk_drawable(self._gtk_inner_widget.bin_window)
     context = Gdk.cairo_create(self._gtk_inner_widget.get_bin_window())
     self._gtk_prepare_cairo_context(context)
     canvas = Canvas._from_cairo_context(context)
     proc(canvas)
    def with_canvas(self, proc):
        hadj, vadj = self._gtk_adjustments()
        clip = rect_sized((hadj.value, vadj.value), self.size)
#		canvas = Canvas._from_gdk_drawable(self._gtk_inner_widget.bin_window)
        context = Gdk.cairo_create(self._gtk_inner_widget.get_bin_window())
        self._gtk_prepare_cairo_context(context)
        canvas = Canvas._from_cairo_context(context)
        proc(canvas)
Example #3
0
 def _gtk_draw_signal(self, context):
     try:
         self._gtk_prepare_cairo_context(context)
         clip = context.clip_extents()
         canvas = Canvas._from_cairo_context(context)
         self.draw(canvas, clip)
     except:
         print "------------------ Exception while drawing ------------------"
         traceback.print_exc()
 def _gtk_draw_signal(self, context):
     try:
         self._gtk_prepare_cairo_context(context)
         clip = context.clip_extents()
         canvas = Canvas._from_cairo_context(context)
         self.draw(canvas, clip)
     except:
         print "------------------ Exception while drawing ------------------"
         traceback.print_exc()
 def OnDraw(self, dc):
     #print "ScrollableView.OnDraw" ###
     update_rect = dc.GetClipBox()
     canvas = Canvas._from_win_dc(dc)
     self.draw(canvas, update_rect)
Example #6
0
 def draw_page(_, gtk_print_context, page_num):
     cairo_context = gtk_print_context.get_cairo_context()
     canvas = Canvas._from_cairo_context(cairo_context)
     paginator.draw_page(canvas, page_num)
 def with_canvas(self, proc):
     canvas = Canvas._from_gdk_drawable(self._gdk_pixmap)
     canvas.backcolor = clear
     proc(canvas)
Example #8
0
 def with_canvas(self, proc):
     canvas = Canvas._from_gdk_drawable(self._gdk_pixmap)
     canvas.backcolor = clear
     proc(canvas)
Example #9
0
 def OnDraw(self, dc):
     #print "ScrollableView.OnDraw" ###
     update_rect = dc.GetClipBox()
     canvas = Canvas._from_win_dc(dc)
     self.draw(canvas, update_rect)
Example #10
0
 def draw_page(_, gtk_print_context, page_num):
     cairo_context = gtk_print_context.get_cairo_context()
     canvas = Canvas._from_cairo_context(cairo_context)
     paginator.draw_page(canvas, page_num)