Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv23647

Modified Files:
        osd.py 
Log Message:
Fixed a bug wit drawstringframed hard.  Its return coords were always 0's
which made it impossible to judge the size.


Index: osd.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/osd.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** osd.py      24 Jun 2003 22:48:08 -0000      1.48
--- osd.py      26 Jun 2003 01:41:15 -0000      1.49
***************
*** 10,13 ****
--- 10,17 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.49  2003/06/26 01:41:15  rshortt
+ # Fixed a bug wit drawstringframed hard.  Its return coords were always 0's
+ # which made it impossible to judge the size.
+ #
  # Revision 1.48  2003/06/24 22:48:08  outlyer
  # Updated to reflect moved icon.
***************
*** 1074,1080 ****
          rest_words = string[i+1:len(string)]
              
-         if layer == self.null_layer:
-             return (rest_words, (return_x0,return_y0, return_x1, return_y1))
- 
          if bgcolor != None:
              self.drawbox(x,y, x+width, y+height, width=-1, color=bgcolor, 
layer=layer)
--- 1078,1081 ----
***************
*** 1086,1100 ****
              y0 = y + (height - (line_number+1) * word_height)
  
          
          for line in lines:
              x0 = x
              if align_h == 'center' or align_h == 'justified':
-                 line_size, line_heigth = self.stringsize(line, font, ptsize)
                  x0 = x + (width - line_size) / 2
              elif align_h == 'right':
-                 line_size, line_heigth = self.stringsize(line, font, ptsize)
                  x0 = x + (width - line_size)
!             self.drawstring(line, x0, y0, fgcolor, None, font, ptsize, layer=layer)
              y0 += word_height
  
          return (rest_words, (return_x0,return_y0, return_x1, return_y1))
--- 1087,1109 ----
              y0 = y + (height - (line_number+1) * word_height)
  
+         return_y0 = y0
+         return_x0 = return_x1 = x
          
          for line in lines:
              x0 = x
+             line_size, line_heigth = self.stringsize(line, font, ptsize)
              if align_h == 'center' or align_h == 'justified':
                  x0 = x + (width - line_size) / 2
              elif align_h == 'right':
                  x0 = x + (width - line_size)
!             if layer != self.null_layer:
!                 self.drawstring(line, x0, y0, fgcolor, None, font, ptsize, 
layer=layer)
              y0 += word_height
+             if x0 > return_x0:
+                 return_x0 = x0
+             if line_size > return_x1:
+                 return_x1 = line_size
+ 
+         return_y1 = y0
  
          return (rest_words, (return_x0,return_y0, return_x1, return_y1))




-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to