OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 | 8 |
9 | 9 |
10 #ifndef SkDrawMatrix_DEFINED | 10 #ifndef SkDrawMatrix_DEFINED |
11 #define SkDrawMatrix_DEFINED | 11 #define SkDrawMatrix_DEFINED |
12 | 12 |
13 #include "SkADrawable.h" | 13 #include "SkADrawable.h" |
14 #include "SkMatrix.h" | 14 #include "SkMatrix.h" |
15 #include "SkMemberInfo.h" | 15 #include "SkMemberInfo.h" |
16 #include "SkIntArray.h" | 16 #include "SkIntArray.h" |
17 | 17 |
18 class SkMatrixPart; | 18 class SkMatrixPart; |
19 | 19 |
20 class SkDrawMatrix : public SkADrawable { | 20 class SkDrawMatrix : public SkADrawable { |
21 DECLARE_DRAW_MEMBER_INFO(Matrix); | 21 DECLARE_DRAW_MEMBER_INFO(Matrix); |
22 SkDrawMatrix(); | 22 SkDrawMatrix(); |
23 virtual ~SkDrawMatrix(); | 23 virtual ~SkDrawMatrix(); |
24 virtual bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE; | 24 bool addChild(SkAnimateMaker& , SkDisplayable* child) SK_OVERRIDE; |
25 virtual bool childrenNeedDisposing() const SK_OVERRIDE; | 25 bool childrenNeedDisposing() const SK_OVERRIDE; |
26 virtual void dirty() SK_OVERRIDE; | 26 void dirty() SK_OVERRIDE; |
27 virtual bool draw(SkAnimateMaker& ) SK_OVERRIDE; | 27 bool draw(SkAnimateMaker& ) SK_OVERRIDE; |
28 #ifdef SK_DUMP_ENABLED | 28 #ifdef SK_DUMP_ENABLED |
29 virtual void dump(SkAnimateMaker* ) SK_OVERRIDE; | 29 void dump(SkAnimateMaker* ) SK_OVERRIDE; |
30 #endif | 30 #endif |
31 SkMatrix& getMatrix(); | 31 SkMatrix& getMatrix(); |
32 virtual bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; | 32 bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE; |
33 virtual void initialize() SK_OVERRIDE; | 33 void initialize() SK_OVERRIDE; |
34 virtual void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; | 34 void onEndElement(SkAnimateMaker& ) SK_OVERRIDE; |
35 virtual void setChildHasID() SK_OVERRIDE; | 35 void setChildHasID() SK_OVERRIDE; |
36 virtual bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; | 36 bool setProperty(int index, SkScriptValue& ) SK_OVERRIDE; |
37 | 37 |
38 void concat(SkMatrix& inMatrix) { | 38 void concat(SkMatrix& inMatrix) { |
39 fConcat.preConcat(inMatrix); | 39 fConcat.preConcat(inMatrix); |
40 } | 40 } |
41 | 41 |
42 virtual SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; | 42 SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE; |
43 | 43 |
44 | 44 |
45 void rotate(SkScalar degrees, SkPoint& center) { | 45 void rotate(SkScalar degrees, SkPoint& center) { |
46 fMatrix.preRotate(degrees, center.fX, center.fY); | 46 fMatrix.preRotate(degrees, center.fX, center.fY); |
47 } | 47 } |
48 | 48 |
49 void set(SkMatrix& src) { | 49 void set(SkMatrix& src) { |
50 fMatrix.preConcat(src); | 50 fMatrix.preConcat(src); |
51 } | 51 } |
52 | 52 |
(...skipping 12 matching lines...) Expand all Loading... |
65 SkTDScalarArray matrix; | 65 SkTDScalarArray matrix; |
66 SkMatrix fConcat; | 66 SkMatrix fConcat; |
67 SkMatrix fMatrix; | 67 SkMatrix fMatrix; |
68 SkTDMatrixPartArray fParts; | 68 SkTDMatrixPartArray fParts; |
69 SkBool8 fChildHasID; | 69 SkBool8 fChildHasID; |
70 SkBool8 fDirty; | 70 SkBool8 fDirty; |
71 typedef SkADrawable INHERITED; | 71 typedef SkADrawable INHERITED; |
72 }; | 72 }; |
73 | 73 |
74 #endif // SkDrawMatrix_DEFINED | 74 #endif // SkDrawMatrix_DEFINED |
OLD | NEW |