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 SkDisplayApply_DEFINED | 10 #ifndef SkDisplayApply_DEFINED |
11 #define SkDisplayApply_DEFINED | 11 #define SkDisplayApply_DEFINED |
12 | 12 |
13 #include "SkAnimateBase.h" | 13 #include "SkAnimateBase.h" |
14 #include "SkDrawable.h" | 14 #include "SkADrawable.h" |
15 #include "SkIntArray.h" | 15 #include "SkIntArray.h" |
16 | 16 |
17 class SkActive; | 17 class SkActive; |
18 | 18 |
19 class SkApply : public SkDrawable { | 19 class SkApply : public SkADrawable { |
20 DECLARE_MEMBER_INFO(Apply); | 20 DECLARE_MEMBER_INFO(Apply); |
21 public: | 21 public: |
22 | 22 |
23 SkApply(); | 23 SkApply(); |
24 virtual ~SkApply(); | 24 virtual ~SkApply(); |
25 | 25 |
26 enum Transition { | 26 enum Transition { |
27 kTransition_normal, | 27 kTransition_normal, |
28 kTransition_reverse | 28 kTransition_reverse |
29 }; | 29 }; |
(...skipping 15 matching lines...) Expand all Loading... |
45 virtual bool draw(SkAnimateMaker& ); | 45 virtual bool draw(SkAnimateMaker& ); |
46 #ifdef SK_DUMP_ENABLED | 46 #ifdef SK_DUMP_ENABLED |
47 virtual void dump(SkAnimateMaker* ); | 47 virtual void dump(SkAnimateMaker* ); |
48 #endif | 48 #endif |
49 virtual bool enable(SkAnimateMaker& ); | 49 virtual bool enable(SkAnimateMaker& ); |
50 void enableCreate(SkAnimateMaker& ); | 50 void enableCreate(SkAnimateMaker& ); |
51 void enableDynamic(SkAnimateMaker& ); | 51 void enableDynamic(SkAnimateMaker& ); |
52 void endSave(int index); | 52 void endSave(int index); |
53 Mode getMode() { return mode; } | 53 Mode getMode() { return mode; } |
54 virtual bool getProperty(int index, SkScriptValue* value) const; | 54 virtual bool getProperty(int index, SkScriptValue* value) const; |
55 SkDrawable* getScope() { return scope; } | 55 SkADrawable* getScope() { return scope; } |
56 void getStep(SkScriptValue* ); | 56 void getStep(SkScriptValue* ); |
57 SkDrawable* getTarget(SkAnimateBase* ); | 57 SkADrawable* getTarget(SkAnimateBase* ); |
58 bool hasDelayedAnimator() const; | 58 bool hasDelayedAnimator() const; |
59 virtual bool hasEnable() const; | 59 virtual bool hasEnable() const; |
60 bool inactivate(SkAnimateMaker& maker); | 60 bool inactivate(SkAnimateMaker& maker); |
61 virtual void initialize(); | 61 virtual void initialize(); |
62 bool interpolate(SkAnimateMaker& , SkMSec time); | 62 bool interpolate(SkAnimateMaker& , SkMSec time); |
63 virtual void onEndElement(SkAnimateMaker& ); | 63 virtual void onEndElement(SkAnimateMaker& ); |
64 virtual const SkMemberInfo* preferredChild(SkDisplayTypes type); | 64 virtual const SkMemberInfo* preferredChild(SkDisplayTypes type); |
65 void refresh(SkAnimateMaker& ); | 65 void refresh(SkAnimateMaker& ); |
66 void reset(); | 66 void reset(); |
67 virtual bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkAp
ply* ); | 67 virtual bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkAp
ply* ); |
68 bool resolveField(SkAnimateMaker& , SkDisplayable* parent, SkString* str); | 68 bool resolveField(SkAnimateMaker& , SkDisplayable* parent, SkString* str); |
69 void save(int index); | 69 void save(int index); |
70 void setEmbedded() { fEmbedded = true; } | 70 void setEmbedded() { fEmbedded = true; } |
71 virtual bool setProperty(int index, SkScriptValue& ); | 71 virtual bool setProperty(int index, SkScriptValue& ); |
72 virtual void setSteps(int _steps); | 72 virtual void setSteps(int _steps); |
73 // virtual void setTime(SkMSec time); | 73 // virtual void setTime(SkMSec time); |
74 #ifdef SK_DEBUG | 74 #ifdef SK_DEBUG |
75 virtual void validate(); | 75 virtual void validate(); |
76 #endif | 76 #endif |
77 private: | 77 private: |
78 SkMSec begin; | 78 SkMSec begin; |
79 SkBool dontDraw; | 79 SkBool dontDraw; |
80 SkString dynamicScope; | 80 SkString dynamicScope; |
81 SkMSec interval; | 81 SkMSec interval; |
82 Mode mode; | 82 Mode mode; |
83 #if 0 | 83 #if 0 |
84 SkBool pickup; | 84 SkBool pickup; |
85 #endif | 85 #endif |
86 SkBool restore; | 86 SkBool restore; |
87 SkDrawable* scope; | 87 SkADrawable* scope; |
88 int32_t steps; | 88 int32_t steps; |
89 Transition transition; | 89 Transition transition; |
90 SkActive* fActive; | 90 SkActive* fActive; |
91 SkTDAnimateArray fAnimators; | 91 SkTDAnimateArray fAnimators; |
92 // SkDrawable* fCurrentScope; | 92 // SkADrawable* fCurrentScope; |
93 SkMSec fLastTime; // used only to return script property time | 93 SkMSec fLastTime; // used only to return script property time |
94 SkTDDrawableArray fScopes; | 94 SkTDDrawableArray fScopes; |
95 SkBool fAppended : 1; | 95 SkBool fAppended : 1; |
96 SkBool fContainsScope : 1; | 96 SkBool fContainsScope : 1; |
97 SkBool fDeleteScope : 1; | 97 SkBool fDeleteScope : 1; |
98 SkBool fEmbedded : 1; | 98 SkBool fEmbedded : 1; |
99 SkBool fEnabled : 1; | 99 SkBool fEnabled : 1; |
100 SkBool fEnabling : 1; // set if calling interpolate from enable | 100 SkBool fEnabling : 1; // set if calling interpolate from enable |
101 friend class SkActive; | 101 friend class SkActive; |
102 friend class SkDisplayList; | 102 friend class SkDisplayList; |
103 typedef SkDrawable INHERITED; | 103 typedef SkADrawable INHERITED; |
104 }; | 104 }; |
105 | 105 |
106 #endif // SkDisplayApply_DEFINED | 106 #endif // SkDisplayApply_DEFINED |
OLD | NEW |