blob: 321c4ee657b5a90c84f64bc11cb2079f0628a4f1 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
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
reed@android.com8a1c16f2008-12-17 15:59:43 +00009
10#ifndef SkDrawRectangle_DEFINED
11#define SkDrawRectangle_DEFINED
12
13#include "SkBoundable.h"
14#include "SkMemberInfo.h"
15#include "SkRect.h"
16
17class SkRectToRect;
18
19class SkDrawRect : public SkBoundable {
20 DECLARE_DRAW_MEMBER_INFO(Rect);
21 SkDrawRect();
22 virtual void dirty();
23 virtual bool draw(SkAnimateMaker& );
24#ifdef SK_DUMP_ENABLED
25 virtual void dump(SkAnimateMaker* );
26#endif
27 virtual SkDisplayable* getParent() const;
28 virtual bool getProperty(int index, SkScriptValue* value) const;
29 virtual bool setParent(SkDisplayable* parent);
30 virtual bool setProperty(int index, SkScriptValue& );
31protected:
32 SkRect fRect;
33 SkDisplayable* fParent;
34private:
35 friend class SkDrawClip;
36 friend class SkRectToRect;
37 friend class SkSaveLayer;
38 typedef SkBoundable INHERITED;
39};
40
41class SkRoundRect : public SkDrawRect {
42 DECLARE_MEMBER_INFO(RoundRect);
43 SkRoundRect();
44 virtual bool draw(SkAnimateMaker& );
45#ifdef SK_DUMP_ENABLED
46 virtual void dump(SkAnimateMaker* );
rmistry@google.comd6176b02012-08-23 18:14:13 +000047#endif
reed@android.com8a1c16f2008-12-17 15:59:43 +000048protected:
49 SkScalar rx;
50 SkScalar ry;
51private:
52 typedef SkDrawRect INHERITED;
53};
54
55#endif // SkDrawRectangle_DEFINED
56