OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef Viewer_DEFINED | 8 #ifndef Viewer_DEFINED |
9 #define Viewer_DEFINED | 9 #define Viewer_DEFINED |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 Viewer(int argc, char** argv, void* platformData); | 21 Viewer(int argc, char** argv, void* platformData); |
22 ~Viewer() override; | 22 ~Viewer() override; |
23 | 23 |
24 bool onKey(sk_app::Window::Key key, sk_app::Window::InputState state, uint32
_t modifiers); | 24 bool onKey(sk_app::Window::Key key, sk_app::Window::InputState state, uint32
_t modifiers); |
25 bool onChar(SkUnichar, uint32_t modifiers); | 25 bool onChar(SkUnichar, uint32_t modifiers); |
26 void onPaint(SkCanvas* canvas); | 26 void onPaint(SkCanvas* canvas); |
27 void onIdle(double ms) override; | 27 void onIdle(double ms) override; |
28 | 28 |
29 private: | 29 private: |
30 void initSlides(); | 30 void initSlides(); |
| 31 void updateTitle(); |
31 void setupCurrentSlide(int previousSlide); | 32 void setupCurrentSlide(int previousSlide); |
32 | 33 |
33 void drawStats(SkCanvas* canvas); | 34 void drawStats(SkCanvas* canvas); |
34 | 35 |
35 void changeZoomLevel(float delta); | 36 void changeZoomLevel(float delta); |
36 void updateMatrix(); | 37 void updateMatrix(); |
37 | 38 |
38 sk_app::Window* fWindow; | 39 sk_app::Window* fWindow; |
39 | 40 |
40 static const int kMeasurementCount = 64; // should be power of 2 for fast m
od | 41 static const int kMeasurementCount = 64; // should be power of 2 for fast m
od |
(...skipping 10 matching lines...) Expand all Loading... |
51 SkMatrix fLocalMatrix; | 52 SkMatrix fLocalMatrix; |
52 SkScalar fZoomCenterX; | 53 SkScalar fZoomCenterX; |
53 SkScalar fZoomCenterY; | 54 SkScalar fZoomCenterY; |
54 SkScalar fZoomLevel; | 55 SkScalar fZoomLevel; |
55 SkScalar fZoomScale; | 56 SkScalar fZoomScale; |
56 | 57 |
57 }; | 58 }; |
58 | 59 |
59 | 60 |
60 #endif | 61 #endif |
OLD | NEW |