renderer changes

This commit is contained in:
Tim Bentley 2010-03-10 16:57:33 +00:00
parent 47bf6252bb
commit 9bace991fa
2 changed files with 7 additions and 33 deletions

View File

@ -466,38 +466,9 @@ class Renderer(object):
self._get_extent_and_render(line, footer, self._get_extent_and_render(line, footer,
tlcorner=(x + display_shadow_size, y + display_shadow_size), tlcorner=(x + display_shadow_size, y + display_shadow_size),
draw=True, color = self._theme.display_shadow_color) draw=True, color = self._theme.display_shadow_color)
if self._theme.display_outline: self._get_extent_and_render(line, footer, tlcorner=(x, y), draw=True,
self._get_extent_and_render(line, footer, outline_size=display_outline_size,
(x + display_outline_size, y), draw=True, outline_color=self._theme.display_outline_color)
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x, y + display_outline_size), draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x, y - display_outline_size), draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x - display_outline_size, y), draw=True,
color = self._theme.display_outline_color)
if display_outline_size > 1:
self._get_extent_and_render(line, footer,
(x + display_outline_size, y + display_outline_size),
draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x - display_outline_size, y + display_outline_size),
draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x + display_outline_size, y - display_outline_size),
draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,
(x - display_outline_size, y - display_outline_size),
draw=True,
color = self._theme.display_outline_color)
self._get_extent_and_render(line, footer,tlcorner=(x, y),
draw=True)
y += h y += h
if linenum == 0: if linenum == 0:
self._first_line_right_extent = rightextent self._first_line_right_extent = rightextent
@ -535,7 +506,7 @@ class Renderer(object):
self.mainFont.setPixelSize(self._theme.font_main_proportion) self.mainFont.setPixelSize(self._theme.font_main_proportion)
def _get_extent_and_render(self, line, footer, tlcorner=(0, 0), draw=False, def _get_extent_and_render(self, line, footer, tlcorner=(0, 0), draw=False,
color=None): color=None, outline_size=0, outline_color=None):
""" """
Find bounding box of text - as render_single_line. If draw is set, Find bounding box of text - as render_single_line. If draw is set,
actually draw the text to the current DC as well return width and actually draw the text to the current DC as well return width and

View File

@ -449,8 +449,10 @@ class SlideController(QtGui.QWidget):
#If verse handle verse number else tag only #If verse handle verse number else tag only
if bits[0] == self.trUtf8('Verse'): if bits[0] == self.trUtf8('Verse'):
tag = u'%s%s' % (bits[0][0], bits[1][0:] ) tag = u'%s%s' % (bits[0][0], bits[1][0:] )
row = bits[1][0:]
else: else:
tag = bits[0] tag = bits[0]
row = bits[0][0:1]
try: try:
test = self.slideList[tag] test = self.slideList[tag]
except: except:
@ -469,6 +471,7 @@ class SlideController(QtGui.QWidget):
self.PreviewListWidget.setCellWidget(framenumber, 0, label) self.PreviewListWidget.setCellWidget(framenumber, 0, label)
slide_height = width * self.parent.RenderManager.screen_ratio slide_height = width * self.parent.RenderManager.screen_ratio
self.PreviewListWidget.setItem(framenumber, 0, item) self.PreviewListWidget.setItem(framenumber, 0, item)
print row
if slide_height != 0: if slide_height != 0:
self.PreviewListWidget.setRowHeight(framenumber, slide_height) self.PreviewListWidget.setRowHeight(framenumber, slide_height)
if self.serviceItem.is_text(): if self.serviceItem.is_text():