From 04056459104460beafcb3c6549967e2d1e4020ea Mon Sep 17 00:00:00 2001 From: noisymime Date: Sun, 6 Jan 2008 01:58:14 +0000 Subject: [PATCH] Further 0.5 updates --- Menu.py | 4 ---- ReflectionTexture.py | 16 +++++++--------- ReflectionTexture.pyc | Bin 1141 -> 1128 bytes 3 files changed, 7 insertions(+), 13 deletions(-) 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 d197d8b6df6ed3b1f4284261dbd27a24aa1e8244..6ca6b80615576dda80f214713c3df5f11de95513 100644 GIT binary patch delta 356 zcmZXOu}Z{15QhKR&E}H3i%Jwh3l$3yvAD(;5e_Vb<1lh=b2+>P4Q#MTX?5%q*x3ud zg0CW$g1xgFBZ9EA%>VO$GxL?aC-KW?*00W1@e^&Wo=+bPpkp+ITEKGOL+e<9g0N!= zIza<3_%#aTEfrE};N%}Jg_VKhtk3m-(2g5;eJM~!sFmj~^bj`kbI5PcVAZc^Pf1aP zQ~r(P_!+TJ)cNhK}w=KteyR1PQw5f7BBCaT>j52x1m6LmvAKx1MLhb+n delta 353 zcmZXOy-EW?6ot>dv%6WdI~vw1pcpJHM8vl+rHx%cBSY|Hx>n))g4`)xiQ`SF;4XF+-Z