sugar-toolkit-gtk3/sugar/scene/PixbufActor.py

15 lines
320 B
Python
Raw Normal View History

import gtk
from sugar.scene.Actor import Actor
class PixbufActor(Actor):
def __init__(self, pixbuf):
Actor.__init__(self)
self._pixbuf = pixbuf
2006-07-24 11:01:25 +02:00
def render(self, drawable, transf):
(x, y) = transf.get_position(self._x, self._y)
gc = gtk.gdk.GC(drawable)
2006-07-24 11:01:25 +02:00
drawable.draw_pixbuf(gc, self._pixbuf, 0, 0, x, y)