diff --git a/Menu.py b/Menu.py index 98acc04..29f76b9 100644 --- a/Menu.py +++ b/Menu.py @@ -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() diff --git a/ReflectionTexture.py b/ReflectionTexture.py index af25845..c05abf7 100644 --- a/ReflectionTexture.py +++ b/ReflectionTexture.py @@ -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) \ No newline at end of file diff --git a/ReflectionTexture.pyc b/ReflectionTexture.pyc index d197d8b..6ca6b80 100644 Binary files a/ReflectionTexture.pyc and b/ReflectionTexture.pyc differ