Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30344
Modified Files:
osd.py
Log Message:
handle missing surfarray (Python Numeric)
Index: osd.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/osd.py,v
retrieving revision 1.158
retrieving revision 1.159
diff -C2 -d -r1.158 -r1.159
*** osd.py 6 Jun 2004 06:32:33 -0000 1.158
--- osd.py 6 Jun 2004 16:13:27 -0000 1.159
***************
*** 12,15 ****
--- 12,18 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.159 2004/06/06 16:13:27 dischi
+ # handle missing surfarray (Python Numeric)
+ #
# Revision 1.158 2004/06/06 06:32:33 dischi
# check osd init before drawstringframed
***************
*** 838,855 ****
which don't fit it's content area.
"""
! #n = time.time()
! opaque_mod = float(1)
! opaque_stp = opaque_mod/float(pixels)
! w, h = surface.get_size()
! alpha = pygame.surfarray.pixels_alpha(surface)
!
! # transform all the alpha values in x,y range
! # any speedup could help alot
! for x in range(max(w-pixels, 1), w):
! for y in range(1, h):
! if alpha[x,y][0] != 0:
! alpha[x,y] = int(alpha[x,y][0]*opaque_mod)
! opaque_mod -= opaque_stp
def drawstringframed(self, string, x, y, width, height, font, fgcolor=None,
--- 841,859 ----
which don't fit it's content area.
"""
! try:
! opaque_mod = float(1)
! opaque_stp = opaque_mod/float(pixels)
! w, h = surface.get_size()
! alpha = pygame.surfarray.pixels_alpha(surface)
+ # transform all the alpha values in x,y range
+ # any speedup could help alot
+ for x in range(max(w-pixels, 1), w):
+ for y in range(1, h):
+ if alpha[x,y][0] != 0:
+ alpha[x,y] = int(alpha[x,y][0]*opaque_mod)
+ opaque_mod -= opaque_stp
+ except Exception, e:
+ print e
def drawstringframed(self, string, x, y, width, height, font, fgcolor=None,
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog