3 * Copyright 2006 The Android Open Source Project
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
10 #ifndef SkDrawPaint_DEFINED
11 #define SkDrawPaint_DEFINED
13 #include "SkADrawable.h"
14 #include "SkIntArray.h"
15 #include "SkMemberInfo.h"
17 #include "SkXfermode.h"
19 class SkDrawMaskFilter;
20 class SkDrawPathEffect;
25 class SkDrawPaint : public SkADrawable {
26 DECLARE_DRAW_MEMBER_INFO(Paint);
28 virtual ~SkDrawPaint();
29 virtual bool add(SkAnimateMaker* , SkDisplayable* child);
30 SkDisplayable* deepCopy(SkAnimateMaker* ) SK_OVERRIDE;
31 bool draw(SkAnimateMaker& ) SK_OVERRIDE;
32 #ifdef SK_DUMP_ENABLED
33 void dump(SkAnimateMaker* ) SK_OVERRIDE;
35 virtual void executeFunction(SkDisplayable* target, int index,
36 SkTDArray<SkScriptValue>& parameters, SkDisplayTypes type,
37 SkScriptValue* ) SK_OVERRIDE;
38 const SkFunctionParamType* getFunctionsParameters() SK_OVERRIDE;
39 bool getProperty(int index, SkScriptValue* value) const SK_OVERRIDE;
40 bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* apply) SK_OVERRIDE;
42 static const SkFunctionParamType fFunctionParameters[];
43 void setupPaint(SkPaint* paint) const;
50 SkDrawMaskFilter* maskFilter;
51 SkDrawPathEffect* pathEffect;
55 int /*SkPaint::Cap*/ strokeCap;
56 int /*SkPaint::Join */ strokeJoin;
59 int /* SkPaint::Style */ style;
60 int /* SkPaint::Align */ textAlign;
64 SkDrawTypeface* typeface;
66 int /*SkXfermode::Modes*/ xfermode;
68 SkBool8 fOwnsMaskFilter;
69 SkBool8 fOwnsPathEffect;
71 SkBool8 fOwnsTransferMode;
72 SkBool8 fOwnsTypeface;
74 typedef SkADrawable INHERITED;
75 friend class SkTextToPath;
76 friend class SkSaveLayer;
79 #endif // SkDrawPaint_DEFINED