Author: dmeyer
Date: Wed May  3 10:53:27 2006
New Revision: 1533

Modified:
   trunk/canvas/src/text.py

Log:
try to fix a bug with small text areas

Modified: trunk/canvas/src/text.py
==============================================================================
--- trunk/canvas/src/text.py    (original)
+++ trunk/canvas/src/text.py    Wed May  3 10:53:27 2006
@@ -14,7 +14,6 @@
 except ImportError:
     imlib2 = None
 
-
 class Text(Object):
 
     def __init__(self, text = None, font = None, size = None, color = None):
@@ -93,9 +92,12 @@
         # earlier.
         padding = self._get_computed_padding()
         i.draw_text((padding[3], padding[1]), self["text"] + " ", 
(255,255,255,255), self._font)
+        # DISCHI: bug here. The code would draw the mask at a negative x value 
if
+        # i.size[0] < _text_fadeout_mask.size[0] and this does not work. So 
now we
+        # use max(0, value) to avoid that, but this is not correct in the way 
it looks.
         if draw_mask:
             for y in range(0, i.size[1], _text_fadeout_mask.size[1]):
-                i.draw_mask(_text_fadeout_mask, (i.size[0] -  
_text_fadeout_mask.size[0], y))
+                i.draw_mask(_text_fadeout_mask, (max(0, i.size[0] -  
_text_fadeout_mask.size[0]), y))
 
         self._o.size_set(i.size)
         self._o.data_set(i.get_raw_data(), copy = False)


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to