Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/scene/PixbufActor.py
blob: 7c5d6c6b43f6534c8ab54e00546c28e9df2acf6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)