Update of /cvsroot/freevo/freevo/src/gui/areas
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9198/src/gui/areas
Modified Files:
area.py
Log Message:
add alpha support for images
Index: area.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/areas/area.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** area.py 31 Dec 2004 11:57:41 -0000 1.22
--- area.py 1 Jan 2005 17:04:56 -0000 1.23
***************
*** 193,197 ****
! def __calc_geometry(self, obj):
"""
Calculate the real values of the obj (e.g. content) based
--- 193,197 ----
! def __calc_geometry(self, obj, respect_area_geometry=True):
"""
Calculate the real values of the obj (e.g. content) based
***************
*** 222,232 ****
obj.height = self.__area.height
! if obj.width + obj.x > self.__area.width + \
! self.__area.x:
! obj.width = self.__area.width - obj.x
! if obj.height + obj.y > self.__area.height + \
! self.__area.y:
! obj.height = self.__area.height + self.__area.y - obj.y
return obj
--- 222,233 ----
obj.height = self.__area.height
! if respect_area_geometry:
! if obj.width + obj.x > self.__area.width + \
! self.__area.x:
! obj.width = self.__area.width - obj.x
! if obj.height + obj.y > self.__area.height + \
! self.__area.y:
! obj.height = self.__area.height + self.__area.y - obj.y
return obj
***************
*** 241,245 ****
for bg in self.__layout.background:
! bg = self.__calc_geometry(bg)
if bg.type == 'image' and bg.visible:
# if this is the real background image, ignore the
--- 242,247 ----
for bg in self.__layout.background:
! bg = self.__calc_geometry(bg, False)
!
if bg.type == 'image' and bg.visible:
# if this is the real background image, ignore the
***************
*** 261,265 ****
if imagefile:
background_image.append((imagefile, bg.x, bg.y, bg.width,
! bg.height))
elif bg.type == 'rectangle':
--- 263,267 ----
if imagefile:
background_image.append((imagefile, bg.x, bg.y, bg.width,
! bg.height, bg.alpha))
elif bg.type == 'rectangle':
***************
*** 285,292 ****
for image in background_image:
# add the new images to the screen
! imagefile, x, y, width, height = image
i = self.drawimage(imagefile, (x, y, width, height),
background=True)
if i:
self.__background.append(i)
i.info = image
--- 287,296 ----
for image in background_image:
# add the new images to the screen
! imagefile, x, y, width, height, alpha = image
i = self.drawimage(imagefile, (x, y, width, height),
background=True)
if i:
+ if alpha:
+ i.set_alpha(alpha)
self.__background.append(i)
i.info = image
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog