| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #ifndef SkTouchGesture_DEFINED | 8 #ifndef SkTouchGesture_DEFINED |
| 9 #define SkTouchGesture_DEFINED | 9 #define SkTouchGesture_DEFINED |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 kEmpty_State, | 48 kEmpty_State, |
| 49 kTranslate_State, | 49 kTranslate_State, |
| 50 kZoom_State, | 50 kZoom_State, |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 struct Rec { | 53 struct Rec { |
| 54 void* fOwner; | 54 void* fOwner; |
| 55 float fStartX, fStartY; | 55 float fStartX, fStartY; |
| 56 float fPrevX, fPrevY; | 56 float fPrevX, fPrevY; |
| 57 float fLastX, fLastY; | 57 float fLastX, fLastY; |
| 58 SkMSec fPrevT, fLastT; | 58 float fPrevT, fLastT; |
| 59 }; | 59 }; |
| 60 SkTDArray<Rec> fTouches; | 60 SkTDArray<Rec> fTouches; |
| 61 | 61 |
| 62 State fState; | 62 State fState; |
| 63 SkMatrix fLocalM, fGlobalM; | 63 SkMatrix fLocalM, fGlobalM; |
| 64 SkFlingState fFlinger; | 64 SkFlingState fFlinger; |
| 65 SkMSec fLastUpT; | 65 double fLastUpMillis; |
| 66 SkPoint fLastUpP; | 66 SkPoint fLastUpP; |
| 67 | 67 |
| 68 | 68 |
| 69 void flushLocalM(); | 69 void flushLocalM(); |
| 70 int findRec(void* owner) const; | 70 int findRec(void* owner) const; |
| 71 void appendNewRec(void* owner, float x, float y); | 71 void appendNewRec(void* owner, float x, float y); |
| 72 float computePinch(const Rec&, const Rec&); | 72 float computePinch(const Rec&, const Rec&); |
| 73 float limitTotalZoom(float scale) const; | 73 float limitTotalZoom(float scale) const; |
| 74 bool handleDblTap(float, float); | 74 bool handleDblTap(float, float); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 #endif | 77 #endif |
| OLD | NEW |