gfx/skia/trunk/include/views/animated/SkBorderView.h

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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  */
    10 #ifndef SkBorderView_DEFINED
    11 #define SkBorderView_DEFINED
    13 #include "SkView.h"
    14 #include "SkWidgetViews.h"
    15 #include "SkAnimator.h"
    17 class SkBorderView : public SkWidgetView {
    18 public:
    19     SkBorderView();
    20     ~SkBorderView();
    21     void setSkin(const char skin[]);
    22     SkScalar getLeft() const { return fLeft; }
    23     SkScalar getRight() const { return fRight; }
    24     SkScalar getTop() const { return fTop; }
    25     SkScalar getBottom() const { return fBottom; }
    26 protected:
    27     //overrides
    28     virtual void onInflate(const SkDOM& dom,  const SkDOM::Node* node);
    29     virtual void onSizeChange();
    30     virtual void onDraw(SkCanvas* canvas);
    31     virtual bool onEvent(const SkEvent& evt);
    32 private:
    33     SkAnimator fAnim;
    34     SkScalar fLeft, fRight, fTop, fBottom;  //margin on each side
    35     SkRect fMargin;
    37     typedef SkWidgetView INHERITED;
    38 };
    40 #endif

mercurial