epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
| 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.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 9 | |
| 10 | #ifndef SkDrawRectangle_DEFINED |
| 11 | #define SkDrawRectangle_DEFINED |
| 12 | |
| 13 | #include "SkBoundable.h" |
| 14 | #include "SkMemberInfo.h" |
| 15 | #include "SkRect.h" |
| 16 | |
| 17 | class SkRectToRect; |
| 18 | |
| 19 | class 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& ); |
| 31 | protected: |
| 32 | SkRect fRect; |
| 33 | SkDisplayable* fParent; |
| 34 | private: |
| 35 | friend class SkDrawClip; |
| 36 | friend class SkRectToRect; |
| 37 | friend class SkSaveLayer; |
| 38 | typedef SkBoundable INHERITED; |
| 39 | }; |
| 40 | |
| 41 | class 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.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 47 | #endif |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 48 | protected: |
| 49 | SkScalar rx; |
| 50 | SkScalar ry; |
| 51 | private: |
| 52 | typedef SkDrawRect INHERITED; |
| 53 | }; |
| 54 | |
| 55 | #endif // SkDrawRectangle_DEFINED |
| 56 | |