Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3311
Modified Files:
osd.py
Log Message:
fix geometry calculation for border fonts
Index: osd.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/osd.py,v
retrieving revision 1.134
retrieving revision 1.135
diff -C2 -d -r1.134 -r1.135
*** osd.py 6 Feb 2004 18:24:39 -0000 1.134
--- osd.py 7 Feb 2004 11:50:57 -0000 1.135
***************
*** 11,14 ****
--- 11,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.135 2004/02/07 11:50:57 dischi
+ # fix geometry calculation for border fonts
+ #
# Revision 1.134 2004/02/06 18:24:39 dischi
# make to possible to override busy icon with skin
***************
*** 904,908 ****
height = font.height
elif border_color != None:
! height -= border_radius
else:
height -= abs(shadow_y)
--- 907,911 ----
height = font.height
elif border_color != None:
! height -= border_radius * 2
else:
height -= abs(shadow_y)
***************
*** 927,931 ****
current_ellipses = ''
hard = mode == 'hard'
!
while(num_lines_left):
# calc each line and put the rest into the next
--- 930,934 ----
current_ellipses = ''
hard = mode == 'hard'
!
while(num_lines_left):
# calc each line and put the rest into the next
***************
*** 948,952 ****
(w, s, r, n) = self.__drawstringframed_line__(string, width,
font,
'hard', None, ' ')
-
lines.append((w, s))
while r and r[0] == '\n':
--- 951,954 ----
***************
*** 981,988 ****
layer = self.screen
! if layer:
! fgcolor = self._sdlcol(fgcolor)
! if border_color != None:
! border_color = self._sdlcol(border_color)
for w, l in lines:
--- 983,989 ----
layer = self.screen
! fgcolor = self._sdlcol(fgcolor)
! if border_color != None:
! border_color = self._sdlcol(border_color)
for w, l in lines:
***************
*** 1036,1040 ****
# change max_x, min_x, y and height_needed to reflect the
! # changes from border and shadow
if shadow_x:
if shadow_x < 0:
--- 1037,1041 ----
# change max_x, min_x, y and height_needed to reflect the
! # changes from shadow
if shadow_x:
if shadow_x < 0:
***************
*** 1049,1052 ****
--- 1050,1054 ----
height_needed += shadow_y
+ # add border radius for each line
if border_color:
max_x += border_radius
***************
*** 1054,1058 ****
y -= border_radius
height_needed += border_radius * 2
!
return r, (min_x, y, max_x, y+height_needed)
--- 1056,1060 ----
y -= border_radius
height_needed += border_radius * 2
!
return r, (min_x, y, max_x, y+height_needed)
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog