OLD | NEW |
1 | |
2 /* | 1 /* |
3 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
4 * | 3 * |
5 * 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 |
6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
7 */ | 6 */ |
8 | 7 |
9 | |
10 #ifndef SkDrawColor_DEFINED | 8 #ifndef SkDrawColor_DEFINED |
11 #define SkDrawColor_DEFINED | 9 #define SkDrawColor_DEFINED |
12 | 10 |
13 #include "SkPaintParts.h" | 11 #include "SkPaintPart.h" |
14 #include "SkColor.h" | 12 #include "SkColor.h" |
15 | 13 |
16 class SkDrawColor : public SkPaintPart { | 14 class SkDrawColor : public SkPaintPart { |
17 DECLARE_DRAW_MEMBER_INFO(Color); | 15 DECLARE_DRAW_MEMBER_INFO(Color); |
18 SkDrawColor(); | 16 SkDrawColor(); |
19 virtual bool add(); | 17 virtual bool add(); |
20 virtual void dirty(); | 18 virtual void dirty(); |
21 #ifdef SK_DUMP_ENABLED | 19 #ifdef SK_DUMP_ENABLED |
22 virtual void dump(SkAnimateMaker* ); | 20 virtual void dump(SkAnimateMaker* ); |
23 #endif | 21 #endif |
24 SkColor getColor(); | 22 SkColor getColor(); |
25 virtual SkDisplayable* deepCopy(SkAnimateMaker* ); | 23 virtual SkDisplayable* deepCopy(SkAnimateMaker* ); |
26 virtual SkDisplayable* getParent() const; | 24 virtual SkDisplayable* getParent() const; |
27 virtual bool getProperty(int index, SkScriptValue* value) const; | 25 virtual bool getProperty(int index, SkScriptValue* value) const; |
28 virtual void onEndElement(SkAnimateMaker& ); | 26 virtual void onEndElement(SkAnimateMaker& ); |
29 virtual bool setParent(SkDisplayable* parent); | 27 virtual bool setParent(SkDisplayable* parent); |
30 virtual bool setProperty(int index, SkScriptValue&); | 28 virtual bool setProperty(int index, SkScriptValue&); |
31 protected: | 29 protected: |
32 SkColor color; | 30 SkColor color; |
33 SkScalar fHue; | 31 SkScalar fHue; |
34 SkScalar fSaturation; | 32 SkScalar fSaturation; |
35 SkScalar fValue; | 33 SkScalar fValue; |
36 SkBool fDirty; | 34 SkBool fDirty; |
37 private: | 35 private: |
38 friend class SkDrawGradient; | 36 friend class SkDrawGradient; |
39 typedef SkPaintPart INHERITED; | 37 typedef SkPaintPart INHERITED; |
40 }; | 38 }; |
41 | 39 |
42 #endif // SkDrawColor_DEFINED | 40 #endif // SkDrawColor_DEFINED |
OLD | NEW |