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