Update of /cvsroot/freevo/freevo/src/video/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv22076/src/video/plugins
Modified Files:
bmovl.py
Log Message:
make bmovl work again
Index: bmovl.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/plugins/bmovl.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** bmovl.py 7 Dec 2003 19:40:30 -0000 1.6
--- bmovl.py 11 Jan 2004 20:01:28 -0000 1.7
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.7 2004/01/11 20:01:28 dischi
+ # make bmovl work again
+ #
# Revision 1.6 2003/12/07 19:40:30 dischi
# convert OVERSCAN variable names
***************
*** 77,81 ****
self.height = height
self.depth = 32
! self.screen = pygame.Surface((width, height), SRCALPHA)
# clear surface
--- 80,84 ----
self.height = height
self.depth = 32
! self.screen = pygame.Surface((width, height), pygame.SRCALPHA)
# clear surface
***************
*** 138,141 ****
--- 141,145 ----
self.player = player
self.osd_visible = False
+ print '1'
self.bmovl = None
if os.path.exists('/tmp/bmovl'):
***************
*** 150,154 ****
_debug_('show osd')
! height = config.OSD_OSD_OVERSCAN_Y + 60
if not skin.get_singleton().settings.images.has_key('background'):
_debug_('no background')
--- 154,158 ----
_debug_('show osd')
! height = config.OSD_OVERSCAN_Y + 60
if not skin.get_singleton().settings.images.has_key('background'):
_debug_('no background')
***************
*** 165,173 ****
clock = time.strftime('%a %I:%M %P')
clock_font = skin.get_singleton().get_font('clock')
! clock_width = clock_font.font.stringsize(clock)
! self.bmovl.drawstringframed(clock,
self.bmovl.width-config.OSD_OVERSCAN_X-10-clock_width,
! config.OSD_OVERSCAN_Y+10, clock_width, -1,
! clock_font.font, clock_font.color)
self.bmovl.update((0, 0, self.bmovl.width, height))
--- 169,186 ----
clock = time.strftime('%a %I:%M %P')
clock_font = skin.get_singleton().get_font('clock')
! clock_width = clock_font.stringsize(clock)
!
! shadow = None
! border = None
! if clock_font.shadow.visible:
! if clock_font.shadow.border:
! border = clock_font.shadow.color
! else:
! shadow = (clock_font.shadow.x, clock_font.shadow.y,
clock_font.shadow.color)
! self.bmovl.drawstringframed(clock,
self.bmovl.width-config.OSD_OVERSCAN_X-10-\
! clock_width, config.OSD_OVERSCAN_Y+10,
! clock_width, -1, clock_font.font,
clock_font.color,
! shadow=shadow, border_color=border)
self.bmovl.update((0, 0, self.bmovl.width, height))
***************
*** 177,181 ****
x0 = config.OSD_OVERSCAN_X+10
y0 = self.bmovl.height + 5 - height
! width = self.bmovl.width - 2 * config.OSD_OSD_OVERSCAN_X
self.bmovl.drawbox(0, self.bmovl.height + 1 - height, self.bmovl.width,
--- 190,194 ----
x0 = config.OSD_OVERSCAN_X+10
y0 = self.bmovl.height + 5 - height
! width = self.bmovl.width - 2 * config.OSD_OVERSCAN_X
self.bmovl.drawbox(0, self.bmovl.height + 1 - height, self.bmovl.width,
***************
*** 183,187 ****
if self.item.image:
! image = pygame.transform.scale(self.bmovl.loadbitmap(self.item.image),
(65, 90))
self.bmovl.screen.blit(image, (x0, y0))
x0 += image.get_width() + 10
--- 196,203 ----
if self.item.image:
! i = self.bmovl.loadbitmap(self.item.image)
! scale = max(float(i.get_width()) / 200, float(i.get_height()) / 90)
! image = pygame.transform.scale(i, (int(i.get_width() / scale),
! int(i.get_height() / scale)))
self.bmovl.screen.blit(image, (x0, y0))
x0 += image.get_width() + 10
***************
*** 196,207 ****
tagline = show[3]
! title_font = skin.get_singleton().get_font('title')
! tagline_font = skin.get_singleton().get_font('info tagline')
- pos = self.bmovl.drawstringframed(title, x0, y0, width, -1, title_font.font,
- title_font.color)
if tagline:
self.bmovl.drawstringframed(tagline, x0, pos[1][3]+5, width, -1,
! tagline_font.font, tagline_font.color)
self.bmovl.update((0, self.bmovl.height-height, self.bmovl.width, height))
--- 212,242 ----
tagline = show[3]
! font = skin.get_singleton().get_font('title')
!
! shadow = None
! border = None
! if font.shadow.visible:
! if font.shadow.border:
! border = font.shadow.color
! else:
! shadow = (font.shadow.x, font.shadow.y, font.shadow.color)
!
! pos = self.bmovl.drawstringframed(title, x0, y0, width, -1, font.font,
! font.color, shadow=shadow,
border_color=border)
if tagline:
+ font = skin.get_singleton().get_font('info tagline')
+
+ shadow = None
+ border = None
+ if font.shadow.visible:
+ if font.shadow.border:
+ border = font.shadow.color
+ else:
+ shadow = (font.shadow.x, font.shadow.y, font.shadow.color)
+
self.bmovl.drawstringframed(tagline, x0, pos[1][3]+5, width, -1,
! font.font, font.color,
! shadow=shadow, border_color=border)
self.bmovl.update((0, self.bmovl.height-height, self.bmovl.width, height))
***************
*** 216,220 ****
"""
_debug_('hide')
! self.player.thread.app.refresh = None
self.bmovl.clearscreen()
self.bmovl.hide()
--- 251,255 ----
"""
_debug_('hide')
! self.player.app.refresh = None
self.bmovl.clearscreen()
self.bmovl.hide()
***************
*** 236,244 ****
if event == TOGGLE_OSD and self.bmovl:
if self.osd_visible:
! self.player.thread.app.write('osd 1\n')
self.hide_osd()
else:
self.show_osd()
! self.player.thread.app.write('osd 3\n')
self.osd_visible = not self.osd_visible
return True
--- 271,279 ----
if event == TOGGLE_OSD and self.bmovl:
if self.osd_visible:
! self.player.app.write('osd 1\n')
self.hide_osd()
else:
self.show_osd()
! self.player.app.write('osd 3\n')
self.osd_visible = not self.osd_visible
return True
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog