blob: 14788e45baa6441e14bb6ae3b8a7fd1788109d68 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001/*
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.com8a1c16f2008-12-17 15:59:43 +00008#ifndef SkDrawColor_DEFINED
9#define SkDrawColor_DEFINED
10
reed@google.com8d4dc712014-04-18 15:14:25 +000011#include "SkPaintPart.h"
reed@android.com8a1c16f2008-12-17 15:59:43 +000012#include "SkColor.h"
13
14class SkDrawColor : public SkPaintPart {
15 DECLARE_DRAW_MEMBER_INFO(Color);
16 SkDrawColor();
mtklein36352bf2015-03-25 18:17:31 -070017 bool add() override;
18 void dirty() override;
reed@android.com8a1c16f2008-12-17 15:59:43 +000019#ifdef SK_DUMP_ENABLED
mtklein36352bf2015-03-25 18:17:31 -070020 void dump(SkAnimateMaker* ) override;
reed@android.com8a1c16f2008-12-17 15:59:43 +000021#endif
22 SkColor getColor();
mtklein36352bf2015-03-25 18:17:31 -070023 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.com8a1c16f2008-12-17 15:59:43 +000029protected:
30 SkColor color;
31 SkScalar fHue;
32 SkScalar fSaturation;
33 SkScalar fValue;
34 SkBool fDirty;
35private:
rileya@google.com99547762012-07-26 21:25:09 +000036 friend class SkDrawGradient;
reed@android.com8a1c16f2008-12-17 15:59:43 +000037 typedef SkPaintPart INHERITED;
38};
39
40#endif // SkDrawColor_DEFINED