ENH: Default to blitting

Since the Qt4 Agg backend is always used, it's always safe to use blitting.
This commit is contained in:
Tony S Yu
2012-12-09 21:11:06 -05:00
parent 588fe29b57
commit 211bba0195
3 changed files with 3 additions and 14 deletions
+1 -8
View File
@@ -9,11 +9,6 @@ except ImportError:
QDialog = object # hack to prevent nosetest and autodoc errors
print("Could not import PyQt4 -- skimage.viewer not available.")
try:
import matplotlib as mpl
except ImportError:
print("Could not import matplotlib -- skimage.viewer not available.")
from ..utils import RequiredAttr, init_qtapp
@@ -81,7 +76,7 @@ class Plugin(QDialog):
image_viewer = RequiredAttr("%s is not attached to ImageViewer" % name)
draws_on_image = False
def __init__(self, image_filter=None, height=0, width=400, useblit=None):
def __init__(self, image_filter=None, height=0, width=400, useblit=True):
init_qtapp()
super(Plugin, self).__init__()
@@ -98,8 +93,6 @@ class Plugin(QDialog):
self.arguments = []
self.keyword_arguments= {}
if useblit is None:
useblit = True if mpl.backends.backend.endswith('Agg') else False
self.useblit = useblit
self.cids = []
self.artists = []
-1
View File
@@ -103,7 +103,6 @@ class LineProfile(PlotPlugin):
def line_changed(self, end_pts):
x, y = np.transpose(end_pts)
self.end_pts = end_pts
scan = profile_line(self.image_viewer.original_image, end_pts,
linewidth=self.line_tool.linewidth)