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

Modified Files:
        osd.py 
Log Message:
get alignment size from rendered layer

Index: osd.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/osd.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -C2 -d -r1.66 -r1.67
*** osd.py      12 Jul 2003 14:30:14 -0000      1.66
--- osd.py      12 Jul 2003 15:50:46 -0000      1.67
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.67  2003/07/12 15:50:46  dischi
+ # get alignment size from rendered layer
+ #
  # Revision 1.66  2003/07/12 14:30:14  outlyer
  # Changed to Vera for default font.
***************
*** 801,814 ****
              if not l:
                  continue
-             if align_h == 'left' or align_h == 'justified' or not align_h:
-                 x0 = x
-             elif align_h == 'right':
-                 x0 = x + (width - w)
-             elif align_h == 'center':
-                 x0 = x + int((width-w)/2)
-             else:
-                 #print 'what align_h is that: %s' % align_h
-                 x0 = x
  
              if layer != '':
                  try:
--- 804,809 ----
              if not l:
                  continue
  
+             x0 = x
              if layer != '':
                  try:
***************
*** 818,822 ****
                      # redraws changed areas, it doesn't matter and saves the time
                      # when searching the cache
!                     layer.blit(font.font.render(l, 1, self._sdlcol(fgcolor)), (x0, 
y0))
                  except:
                      print "Render failed, skipping..."    
--- 813,822 ----
                      # redraws changed areas, it doesn't matter and saves the time
                      # when searching the cache
!                     render = font.font.render(l, 1, self._sdlcol(fgcolor))
!                     if align_h == 'right':
!                         x0 = x + width - render.get_size()[0]
!                     elif align_h == 'center':
!                         x0 = x + int((width - render.get_size()[0]) / 2)
!                     layer.blit(render, (x0, y0))
                  except:
                      print "Render failed, skipping..."    




-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to