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

Modified Files:
        viewer.py 
Log Message:
move blending effect to osd.py

Index: viewer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/image/viewer.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** viewer.py   21 Nov 2003 11:46:51 -0000      1.31
--- viewer.py   21 Nov 2003 12:22:15 -0000      1.32
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.32  2003/11/21 12:22:15  dischi
+ # move blending effect to osd.py
+ #
  # Revision 1.31  2003/11/21 11:46:51  dischi
  # blend one image to the next, better rotation support
***************
*** 49,53 ****
  import objectcache
  import rc
- import pygame
  
  from gui.GUIObject import GUIObject
--- 52,55 ----
***************
*** 203,231 ****
  
          if last_image and self.last_image[0] != item and 
config.IMAGEVIEWER_BLEND_SPEED:
-             i1 = osd.zoomsurface(last_image[0], last_image[3], last_image[4],
-                                  last_image[5], last_image[6], last_image[7],
-                                  rotation = last_image[8]).convert()
-             i2 = osd.zoomsurface(image, scale, bbx, bby, bbw, bbh,
-                                  rotation = self.rotation).convert()
              screen = osd.screen.convert()
!             
!             for i in range(1, ((255-config.IMAGEVIEWER_BLEND_SPEED) /
!                                config.IMAGEVIEWER_BLEND_SPEED)):
!                 i1.set_alpha(255 - (i * config.IMAGEVIEWER_BLEND_SPEED))
!                 i2.set_alpha(i * config.IMAGEVIEWER_BLEND_SPEED)
!                 screen.fill((0,0,0,0))
!                 screen.blit(i1, (last_image[1], last_image[2]))
!                 screen.blit(i2, (x, y))
!                 osd.screen.blit(screen, (0,0))
!                 if plugin.getbyname('osd'):
!                     plugin.getbyname('osd').draw(('osd', None), osd)
!                 osd.update()
  
!         osd.clearscreen(color=osd.COL_BLACK)
!         osd.drawsurface(image, x, y, scale, bbx, bby, bbw, bbh,
!                        rotation = self.rotation)
  
!         # update the OSD
!         self.drawosd()
  
          if plugin.getbyname('osd'):
--- 205,224 ----
  
          if last_image and self.last_image[0] != item and 
config.IMAGEVIEWER_BLEND_SPEED:
              screen = osd.screen.convert()
!             screen.fill((0,0,0,0))
!             screen.blit(osd.zoomsurface(image, scale, bbx, bby, bbw, bbh,
!                                         rotation = self.rotation).convert(), (x, y))
!             # update the OSD
!             self.drawosd(layer=screen)
  
!             osd.update(blend_surface=screen, 
blend_speed=config.IMAGEVIEWER_BLEND_SPEED)
  
!         else:
!             osd.clearscreen(color=osd.COL_BLACK)
!             osd.drawsurface(image, x, y, scale, bbx, bby, bbw, bbh,
!                             rotation = self.rotation)
! 
!             # update the OSD
!             self.drawosd()
  
          if plugin.getbyname('osd'):
***************
*** 337,341 ****
  
              
!     def drawosd(self):
  
          if not self.osd_mode: return
--- 330,334 ----
  
              
!     def drawosd(self, layer=None):
  
          if not self.osd_mode: return
***************
*** 344,352 ****
            # This is where we add a caption.  Only if playlist is empty
              # May need to check the caption too?
!             osdstring = ["Title: " + self.fileitem.name]
  
            # Here we set up the tags that we want to put in the display
            # Using the following fields
!             tags_check = [[_('Title: '),'name'],
                            [_('Description: '),'description']
                            ]
--- 337,345 ----
            # This is where we add a caption.  Only if playlist is empty
              # May need to check the caption too?
!             osdstring = []
  
            # Here we set up the tags that we want to put in the display
            # Using the following fields
!             tags_check = [[_('Title: '),      'name'],
                            [_('Description: '),'description']
                            ]
***************
*** 358,366 ****
           # create an array with Exif tags as above
           osdstring = []
!            tags_check = [ ['Date:','date'],
!                         ['W:','width'],
!                         ['H:','height'],
!                         ['Model:','hardware'],
!                         ['Software:', 'software']
                         ]
  
--- 351,360 ----
           # create an array with Exif tags as above
           osdstring = []
!            tags_check = [ [_('Title: '),   'name'],
!                           [_('Date: ') ,   'date'],
!                         ['W:',           'width'],
!                         ['H:',           'height'],
!                         [_('Model:'),    'hardware'],
!                         [_('Software:'), 'software']
                         ]
  
***************
*** 415,419 ****
                      osd.height - (config.OVERSCAN_X + 25 + (len(prt_line) * 30)),
                      osd.width, osd.height, width=-1, 
!                     color=((60 << 24) | osd.COL_BLACK))
  
        # Now print the Text
--- 409,413 ----
                      osd.height - (config.OVERSCAN_X + 25 + (len(prt_line) * 30)),
                      osd.width, osd.height, width=-1, 
!                     color=((60 << 24) | osd.COL_BLACK), layer=layer)
  
        # Now print the Text
***************
*** 421,425 ****
              h=osd.height - (40 + config.OVERSCAN_Y + ((len(prt_line) - line - 1) * 
30))
              osd.drawstring(prt_line[line], 15 + config.OVERSCAN_X, h,
!                            fgcolor=osd.COL_ORANGE)
  
  
--- 415,419 ----
              h=osd.height - (40 + config.OVERSCAN_Y + ((len(prt_line) - line - 1) * 
30))
              osd.drawstring(prt_line[line], 15 + config.OVERSCAN_X, h,
!                            fgcolor=osd.COL_ORANGE, layer=layer)
  
  




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to