OLD | NEW |
| (Empty) |
1 /* libs/graphics/animator/SkDrawRectangle.h | |
2 ** | |
3 ** Copyright 2006, The Android Open Source Project | |
4 ** | |
5 ** Licensed under the Apache License, Version 2.0 (the "License"); | |
6 ** you may not use this file except in compliance with the License. | |
7 ** You may obtain a copy of the License at | |
8 ** | |
9 ** http://www.apache.org/licenses/LICENSE-2.0 | |
10 ** | |
11 ** Unless required by applicable law or agreed to in writing, software | |
12 ** distributed under the License is distributed on an "AS IS" BASIS, | |
13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 ** See the License for the specific language governing permissions and | |
15 ** limitations under the License. | |
16 */ | |
17 | |
18 #ifndef SkDrawRectangle_DEFINED | |
19 #define SkDrawRectangle_DEFINED | |
20 | |
21 #include "SkBoundable.h" | |
22 #include "SkMemberInfo.h" | |
23 #include "SkRect.h" | |
24 | |
25 class SkRectToRect; | |
26 | |
27 class SkDrawRect : public SkBoundable { | |
28 DECLARE_DRAW_MEMBER_INFO(Rect); | |
29 SkDrawRect(); | |
30 virtual void dirty(); | |
31 virtual bool draw(SkAnimateMaker& ); | |
32 #ifdef SK_DUMP_ENABLED | |
33 virtual void dump(SkAnimateMaker* ); | |
34 #endif | |
35 virtual SkDisplayable* getParent() const; | |
36 virtual bool getProperty(int index, SkScriptValue* value) const; | |
37 virtual bool setParent(SkDisplayable* parent); | |
38 virtual bool setProperty(int index, SkScriptValue& ); | |
39 protected: | |
40 SkRect fRect; | |
41 SkDisplayable* fParent; | |
42 private: | |
43 friend class SkDrawClip; | |
44 friend class SkRectToRect; | |
45 friend class SkSaveLayer; | |
46 typedef SkBoundable INHERITED; | |
47 }; | |
48 | |
49 class SkRoundRect : public SkDrawRect { | |
50 DECLARE_MEMBER_INFO(RoundRect); | |
51 SkRoundRect(); | |
52 virtual bool draw(SkAnimateMaker& ); | |
53 #ifdef SK_DUMP_ENABLED | |
54 virtual void dump(SkAnimateMaker* ); | |
55 #endif | |
56 protected: | |
57 SkScalar rx; | |
58 SkScalar ry; | |
59 private: | |
60 typedef SkDrawRect INHERITED; | |
61 }; | |
62 | |
63 #endif // SkDrawRectangle_DEFINED | |
64 | |
OLD | NEW |