Index: tools/viewer/Viewer.cpp |
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp |
index 7dd265e6e2183cd75c4e726410be8a845aa12d41..c8b6aef15b719da6805bd7799210f9999ff59577 100644 |
--- a/tools/viewer/Viewer.cpp |
+++ b/tools/viewer/Viewer.cpp |
@@ -224,10 +224,8 @@ void Viewer::updateMatrix(){ |
m.postTranslate(cx, cy); |
} |
- // TODO: add gesture support |
- // Apply any gesture matrix |
- //m.preConcat(fGesture.localM()); |
- //m.preConcat(fGesture.globalM()); |
+ m.preConcat(fWindow->getGestureLocalM()); |
+ m.preConcat(fWindow->getGestureGlobalM()); |
fLocalMatrix = m; |
} |
@@ -260,6 +258,9 @@ void Viewer::onPaint(SkCanvas* canvas) { |
drawStats(canvas); |
} |
fCommands.drawHelp(canvas); |
+ |
+ // Update the matrix to reflect touch/click zoom or move |
+ updateMatrix(); |
djsollen
2016/05/16 19:09:03
shouldn't this update happen as a reponse to touch
liyuqian
2016/05/16 20:34:55
Done.
|
} |
void Viewer::drawStats(SkCanvas* canvas) { |