1c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes
2c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes/*
3c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes * Copyright 2006 The Android Open Source Project
4c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes *
5c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes * Use of this source code is governed by a BSD-style license that can be
6c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes * found in the LICENSE file.
7c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes */
8c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes
9c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes
10c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes#ifndef SkDrawRectangle_DEFINED
11c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes#define SkDrawRectangle_DEFINED
12c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes
13c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes#include "SkBoundable.h"
14c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes#include "SkMemberInfo.h"
15c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes#include "SkRect.h"
16c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes
17c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughesclass SkRectToRect;
18c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes
19c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughesclass SkDrawRect : public SkBoundable {
20c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    DECLARE_DRAW_MEMBER_INFO(Rect);
21c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    SkDrawRect();
22c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    virtual void dirty();
23c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    virtual bool draw(SkAnimateMaker& );
24c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes#ifdef SK_DUMP_ENABLED
25c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    virtual void dump(SkAnimateMaker* );
26c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes#endif
27c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    virtual SkDisplayable* getParent() const;
28c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    virtual bool getProperty(int index, SkScriptValue* value) const;
29c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    virtual bool setParent(SkDisplayable* parent);
30c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    virtual bool setProperty(int index, SkScriptValue& );
31c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughesprotected:
32c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    SkRect fRect;
33c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    SkDisplayable* fParent;
34c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughesprivate:
3511952073af22568bba0b661f7a9d4402c443a888Elliott Hughes    friend class SkDrawClip;
36c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    friend class SkRectToRect;
37c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    friend class SkSaveLayer;
38c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    typedef SkBoundable INHERITED;
39c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes};
40c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes
41c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughesclass SkRoundRect : public SkDrawRect {
42c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    DECLARE_MEMBER_INFO(RoundRect);
43c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    SkRoundRect();
44c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    virtual bool draw(SkAnimateMaker& );
45c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes#ifdef SK_DUMP_ENABLED
46c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    virtual void dump(SkAnimateMaker* );
47c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes#endif
48c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughesprotected:
49c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    SkScalar rx;
50c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    SkScalar ry;
51c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughesprivate:
52c5d028fc913de84a781bd61084bf7ae2182fd48eElliott Hughes    typedef SkDrawRect INHERITED;
53};
54
55#endif // SkDrawRectangle_DEFINED
56