diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2014-01-10 15:48:52 +0800 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2014-01-10 15:48:52 +0800 |
commit | e306a642cdc6ae95ad4bda464d95a28758653bda (patch) | |
tree | 9afe89ccd1115be2de3d5a03b05efe0cbc6dea04 | |
parent | 393c597988e567b9088d91843bad66f9b25ed881 (diff) |
Whitespace
-rwxr-xr-x | slippy.py | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -32,7 +32,7 @@ class Viewer: pass class ViewerGTK (Viewer): - + def __init__(self, fullscreen=False, decorate=True, repeat=False, slideshow=False, delay=5., geometry=''): self.__fullscreen = fullscreen self.__decorate = decorate @@ -150,7 +150,7 @@ class ViewerGTK (Viewer): self.stop_slideshow() else: self.start_slideshow() - + def get_slideshow_delay(self): return self.__delay @@ -381,7 +381,7 @@ class Slide: self.texts = [x for x in self.get_items (renderer)] self.extents = renderer.extents self.text = ''.join (self.texts) - + def get_items (self, renderer): items = self.slide if isinstance (items, types.FunctionType): @@ -394,7 +394,7 @@ class Slide: def __len__ (self): return len (self.texts) - + def show_page (self, renderer, pageno, theme=None): viewer = self.viewer renderer.viewer = viewer @@ -466,7 +466,7 @@ class Slide: cr.show_page() def _extents_union (ex1, ex2): - + if not ex1: return ex2 else: @@ -477,7 +477,7 @@ def _extents_union (ex1, ex2): return [x1, y1, x2 - x1, y2 - y1] def _extents_intersect (ex1, ex2): - + if not ex1: return ex2 else: @@ -489,7 +489,7 @@ def _extents_intersect (ex1, ex2): class Renderer: - + def __init__ (self, cr=None, width=0, height=0): if not cr: cr = pangocairo.CairoContext (cairo.Context (cairo.ImageSurface (0, 0, 0))) @@ -518,7 +518,7 @@ class Renderer: w = max (X) - x h = max (Y) - y return x, y, w, h - + def allocate (self, x, y, w, h): x, y, w, h = self._user_to_device_box (x, y, w, h) self.extents = _extents_union (self.extents, [x, y, w, h]) |