def handle_present_bg(self, key, focus, mark, **a):
"handle-prefix:Present-BG:"
+ s = self["scale:M"]
cmds = key[11:].split(',')
ret = 0
for c in cmds:
rv = None
if c[:6] == 'color:':
rv = focus.call('Draw:clear', 'bg:' + c[6:])
- if c[:14] == "image-stretch:":
+ if s and c[:14] == "image-stretch:":
rv = focus.call('Draw:image', 16, "file:" + self.pathto(c[14:]))
- if c[:6] == "image:":
+ if s and c[:6] == "image:":
rv = focus.call('Draw:image', 4+1, "file:" + self.pathto(c[6:])) # centre
- if c[:8] == "overlay:":
+ if s and c[:8] == "overlay:":
rv = focus.call('Draw:image', 0+2, "file:" + self.pathto(c[8:])) # top right
if c == "page-local":
page = self.find_pages(mark)