protected void onTouchDown(float x, float y) {
        if (mState.mEffect != null) {
            final Rect r = getBounds();
            if (x > r.right) x = r.width();
            else x = x - r.left;

            if (y > r.bottom) y = r.height();
            else y = y - r.top;

            mState.mEffect.touchDown(x, y);

            // Start new animation so we should call stop
            stop();
            startEnterAnim();
        }
    }
Called from the drawable's draw() method after the canvas has been set to
draw the shape at (0,0). Subclasses can override for special effects such
as multiple layers, stroking, etc.
caprice/ui/src/main/java/net/qiujuer/genius/ui/drawable/TouchEffectDrawable.java