You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
315 B
Python

import gtk
from sugar.scene.Actor import Actor
class PixbufActor(Actor):
def __init__(self, pixbuf):
Actor.__init__(self)
self._pixbuf = pixbuf
def render(self, drawable):
(x, y) = self._get_abs_position(self._x, self._y)
gc = gtk.gdk.GC(drawable)
drawable.draw_pixbuf(gc, self._pixbuf, 0, 0, x, y)