Update of /cvsroot/freevo/freevo/src/gui/areas
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22056

Modified Files:
        listing_area.py 
Log Message:
some design improvements, needs still much works

Index: listing_area.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/areas/listing_area.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** listing_area.py     24 Aug 2004 16:42:41 -0000      1.8
--- listing_area.py     7 Sep 2004 18:45:17 -0000       1.9
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.9  2004/09/07 18:45:17  dischi
+ # some design improvements, needs still much works
+ #
  # Revision 1.8  2004/08/24 16:42:41  dischi
  # Made the fxdsettings in gui the theme engine and made a better
***************
*** 58,63 ****
--- 61,90 ----
  
  import copy
+ from mevas.image import CanvasImage
  from area import Area
  
+ 
+ class ItemImage(CanvasImage):
+     """
+     An image object that can be drawn onto a layer. The difference between this
+     and a normal object is that it also has a parameter for shadow values.
+     """
+     def __init__(self, image, pos, shadow):
+         if shadow and shadow.visible and not image.has_alpha:
+             # there are shadow informations and the image has no alpha
+             # values, so draw a shadow. Bug: this only works for shadow.x
+             # and shadow.y both greater 0
+             CanvasImage.__init__(self, (image.width + shadow.x, image.height + 
shadow.y))
+             self.draw_rectangle((shadow.x, shadow.y), (image.width, image.height),
+                                 shadow.color, 1)
+             self.draw_image(image)
+         else:
+             # normal image
+             CanvasImage.__init__(self, image)
+         # set position of the object
+         self.set_pos(pos)
+ 
+ 
+     
  class Listing_Area(Area):
      """
***************
*** 577,589 ****
                          addy = val.height - i_h
  
!                     if val.shadow and val.shadow.visible and not image.has_alpha:
!                         box = self.drawbox(x0 + addx + val.shadow.x,
!                                            y0 + addy + val.shadow.y,
!                                            image.width, image.height,
!                                            (val.shadow.color, 0, 0, 0))
!                         box.layer = -1
!                         gui_objects.append(box)
!                         
!                     i = self.drawimage(image, (x0 + addx, y0 + addy))
                      gui_objects.append(i)
                          
--- 604,609 ----
                          addy = val.height - i_h
  
!                     i = ItemImage(image, (x0 + addx, y0 + addy), val.shadow)
!                     self.layer.add_child(i)
                      gui_objects.append(i)
                          



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to