Example usage for android.graphics RectF equals

List of usage examples for android.graphics RectF equals

Introduction

In this page you can find the example usage for android.graphics RectF equals.

Prototype

@Override
    public boolean equals(Object o) 

Source Link

Usage

From source file:com.hippo.largeimageview.LargeImageView.java

private void applyRectInWindow() {
    final RectF dst = mDst;
    final RectF dstActual = mDstActual;
    final RectF srcActual = mSrcActual;

    dstActual.set(dst);/*from w ww .j a  v  a2  s.com*/
    if (dstActual.intersect(0, 0, mWindowWidth, mWindowHeight)) {
        if (dst.equals(dstActual)) {
            // Still dst
            srcActual.set(0, 0, mImageWidth, mImageHeight);
        } else {
            srcActual.left = lerp(0.0f, mImageWidth, norm(dst.left, dst.right, dstActual.left));
            srcActual.right = lerp(0.0f, mImageWidth, norm(dst.left, dst.right, dstActual.right));
            srcActual.top = lerp(0.0f, mImageHeight, norm(dst.top, dst.bottom, dstActual.top));
            srcActual.bottom = lerp(0.0f, mImageHeight, norm(dst.top, dst.bottom, dstActual.bottom));
        }
    } else {
        // Can't be seen, set src and dst empty
        srcActual.setEmpty();
        dstActual.setEmpty();
    }

    mRectDirty = false;
}