Home | History | Annotate | Download | only in animator
      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 
      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     void dirty() override;
     23     bool draw(SkAnimateMaker& ) override;
     24 #ifdef SK_DUMP_ENABLED
     25     void dump(SkAnimateMaker* ) override;
     26 #endif
     27     SkDisplayable* getParent() const override;
     28     bool getProperty(int index, SkScriptValue* value) const override;
     29     bool setParent(SkDisplayable* parent) override;
     30     bool setProperty(int index, SkScriptValue& ) override;
     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     bool draw(SkAnimateMaker& ) override;
     45 #ifdef SK_DUMP_ENABLED
     46     void dump(SkAnimateMaker* ) override;
     47 #endif
     48 protected:
     49     SkScalar rx;
     50     SkScalar ry;
     51 private:
     52     typedef SkDrawRect INHERITED;
     53 };
     54 
     55 #endif // SkDrawRectangle_DEFINED
     56