epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 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 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 8 | #ifndef SkDrawColor_DEFINED |
| 9 | #define SkDrawColor_DEFINED |
| 10 | |
reed@google.com | 8d4dc71 | 2014-04-18 15:14:25 +0000 | [diff] [blame] | 11 | #include "SkPaintPart.h" |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 12 | #include "SkColor.h" |
| 13 | |
| 14 | class SkDrawColor : public SkPaintPart { |
| 15 | DECLARE_DRAW_MEMBER_INFO(Color); |
| 16 | SkDrawColor(); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 17 | bool add() override; |
| 18 | void dirty() override; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 19 | #ifdef SK_DUMP_ENABLED |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 20 | void dump(SkAnimateMaker* ) override; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 21 | #endif |
| 22 | SkColor getColor(); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 23 | SkDisplayable* deepCopy(SkAnimateMaker* ) override; |
| 24 | SkDisplayable* getParent() const override; |
| 25 | bool getProperty(int index, SkScriptValue* value) const override; |
| 26 | void onEndElement(SkAnimateMaker& ) override; |
| 27 | bool setParent(SkDisplayable* parent) override; |
| 28 | bool setProperty(int index, SkScriptValue&) override; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 29 | protected: |
| 30 | SkColor color; |
| 31 | SkScalar fHue; |
| 32 | SkScalar fSaturation; |
| 33 | SkScalar fValue; |
| 34 | SkBool fDirty; |
| 35 | private: |
rileya@google.com | 9954776 | 2012-07-26 21:25:09 +0000 | [diff] [blame] | 36 | friend class SkDrawGradient; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 37 | typedef SkPaintPart INHERITED; |
| 38 | }; |
| 39 | |
| 40 | #endif // SkDrawColor_DEFINED |