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