Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel QuiƱones <manuq@laptop.org>2013-05-16 01:29:09 (GMT)
committer Agustin Zubiaga <aguz@localhost.localdomain>2013-06-03 19:07:01 (GMT)
commit7baddea12761f3c97095f4025f5999e07c366e14 (patch)
treecf74a48b290987b8def2314e814d7c81deb7cb08
parentb5627152a0dc250a188e1745b89dfab1ce33937e (diff)
Use better filter if not doing touch zoom
-rw-r--r--ImageView.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ImageView.py b/ImageView.py
index d3e3ed5..6219cd7 100644
--- a/ImageView.py
+++ b/ImageView.py
@@ -70,6 +70,7 @@ class ImageViewer(Gtk.DrawingArea):
self._target_point = None
self._anchor_point = None
+ self._in_zoomtouch = False
self._zoomtouch_scale = 1
self.connect('draw', self.__draw_cb)
@@ -160,6 +161,7 @@ class ImageViewer(Gtk.DrawingArea):
self._center_if_small()
def start_zoomtouch(self, center):
+ self._in_zoomtouch = True
self._zoomtouch_scale = 1
prev_target_point = self._target_point
@@ -195,6 +197,7 @@ class ImageViewer(Gtk.DrawingArea):
self.queue_draw()
def finish_zoomtouch(self):
+ self._in_zoomtouch = False
# Apply zoom
zoom = self._zoom * self._zoomtouch_scale
@@ -254,9 +257,6 @@ class ImageViewer(Gtk.DrawingArea):
if self._anchor_point is None:
self._center_anchor_point()
- # FIXME investigate
- ctx.set_antialias(cairo.ANTIALIAS_NONE)
-
ctx.translate(*self._target_point)
zoom_absolute = self._zoom * self._zoomtouch_scale
@@ -266,7 +266,7 @@ class ImageViewer(Gtk.DrawingArea):
ctx.set_source_surface(self._surface, 0, 0)
- # FIXME investigate
- ctx.get_source().set_filter(cairo.FILTER_NEAREST)
+ if self._in_zoomtouch:
+ ctx.get_source().set_filter(cairo.FILTER_NEAREST)
ctx.paint()