Further 0.5 updates

This commit is contained in:
noisymime 2008-01-06 01:58:14 +00:00
parent ef1a22d9a7
commit 0405645910
3 changed files with 7 additions and 13 deletions

View File

@ -363,11 +363,8 @@ class ListItem (clutter.Label):
def addImage(self, path, useReflection):
self.tempTexture = clutter.Texture()
pixbuf = gtk.gdk.pixbuf_new_from_file(path)
self.tempTexture.set_pixbuf(pixbuf)
#Scale the image down by half
xy_ratio = self.tempTexture.get_width() / self.tempTexture.get_height()
self.tempTexture.set_width(int(self.stage.get_width() * 0.20)) #30% of the stages width
@ -388,7 +385,6 @@ class ListItem (clutter.Label):
if useReflection:
self.reflectionTexture = Texture_Reflection(self.tempTexture)
#self.reflectionTexture.set_position(0, 0)#self.tempTexture.get_height())
self.itemTexturesGroup.add(self.reflectionTexture)
self.itemTexturesGroup.hide_all()

View File

@ -6,9 +6,7 @@ class Texture_Reflection (clutter.Texture):
clutter.Texture.__init__(self)
self.set_pixbuf(origTexture.get_pixbuf())
(w, h) = origTexture.get_size()
self.set_width(w)
self.set_height(h)
#Rotate the reflection based on any rotations to the master
ang_y = origTexture.get_rotation(clutter.Y_AXIS) #ryang()
@ -17,15 +15,15 @@ class Texture_Reflection (clutter.Texture):
self.set_rotation(clutter.X_AXIS, ang_x[0], 0, (origTexture.get_height()), 0)
#ang_z = origTexture.get_rotation(clutter.Z_AXIS)
#self.set_rotation(clutter.Z_AXIS, ang_z[0], 0, 0, 0)
#Get the location for it
(x, y) = origTexture.get_position()
print (x, y)
#self.set_clip(0,self.get_height()/2,self.get_width(), (self.get_height()/2))
(w, h) = origTexture.get_size()
self.set_width(w)
self.set_height(h)
#Flip it upside down
self.set_rotation(clutter.X_AXIS, 180, 0, origTexture.get_height(), 0)
#self.rotate_x(180,origTexture.get_height(),0)
self.set_opacity(50)
#Get/Set the location for it
(x, y) = origTexture.get_position()
self.set_position(x, y)

Binary file not shown.