Author: JonNeal
Date: 2008-01-29 00:29:10 +0000 (Tue, 29 Jan 2008)
New Revision: 805

Modified:
   trunk/pysoy/examples/media/pysoy_logo.soy
   trunk/pysoy/src/_core-x11/Window.pxi
   trunk/pysoy/src/textures/Texture.pxi
Log:
fixes for the icon

Modified: trunk/pysoy/examples/media/pysoy_logo.soy
===================================================================
(Binary files differ)

Modified: trunk/pysoy/src/_core-x11/Window.pxi
===================================================================
--- trunk/pysoy/src/_core-x11/Window.pxi        2008-01-29 00:11:16 UTC (rev 
804)
+++ trunk/pysoy/src/_core-x11/Window.pxi        2008-01-29 00:29:10 UTC (rev 
805)
@@ -258,20 +258,19 @@
       _display = glx.DisplayOfScreen(self._screen._screen)
       if not isinstance(value, soy.textures.Texture) :
         raise TypeError('not a Texture')
-      if (<soy.textures.Texture> value)._depth != 1 :
+      if value.depth != 1 :
         raise TypeError('texture must not be 3 dimensional')
-      if (<soy.textures.Texture> value)._chans != 3 :
+      if value.channels != 3 :
         raise TypeError('texture must be RGB format')
       self._icon = value
       ximage_buffer = glx.XCreateImage(_display, 
self._screen._xVisualInfo.visual,
                                        self._screen._xVisualInfo.depth,
-                                       (<int> glx.XYPixmap), 0, value._texels, 
-                                       value._width, value._height, 32, 32)
-      stdio.printf("%s\n",ximage_buffer[0])
-      self._iconID = glx.XCreatePixmap(_display, self._screen, value._width,
-                                     value._height, 
+                                       2, 0, value.pixels, 
+                                       value.width, value.height, 32, 32)
+      self._iconID = glx.XCreatePixmap(_display, self._screen, value.width,
+                                     value.height, 
                                      self._screen._xVisualInfo.depth)
-      stdlib.memcpy(&self._iconID, ximage_buffer, 
value._width*value._height*value._chan)
+      stdlib.memcpy(&self._iconID, ximage_buffer, 
value.width*value.height*value.chan)
       _windows.lock()
       self._setProperties()
       _windows.unlock()

Modified: trunk/pysoy/src/textures/Texture.pxi
===================================================================
--- trunk/pysoy/src/textures/Texture.pxi        2008-01-29 00:11:16 UTC (rev 
804)
+++ trunk/pysoy/src/textures/Texture.pxi        2008-01-29 00:29:10 UTC (rev 
805)
@@ -72,15 +72,28 @@
       return self._aspect
     def __set__(self, aspect) :
       if aspect < 0.0 :
-        raise ValueError('aspect cannot be negetive')
+        raise ValueError('aspect cannot be negative')
       self._aspect = aspect
     def __del__(self) :
       self._aspect = 0.0
 
-  property channels:
-      def __get__(self):
+  property channels :
+    def __get__(self) :
           return self._chans
 
+  property width :
+    def __get__(self) :
+      return self._width
+
+  property height :
+    def __get__(self) :
+      return self._height
+
+  property depth :
+    def __get__(self) :
+      print self._depth
+      return self._depth
+
   property size :
     '''Texture's size
 

_______________________________________________
PySoy-SVN mailing list
[email protected]
http://www.pysoy.org/mailman/listinfo/pysoy-svn

Reply via email to