Code example for RectF

Methods: union

0
            return; 
        } 
 
        final RectF after = mAfter;
        computeRect(after, view);
        after.union(mBefore);
 
        ((View)view.getParent()).invalidate(
                (int) Math.floor(after.left),
                (int) Math.floor(after.top),
                (int) Math.ceil(after.right),
                (int) Math.ceil(after.bottom));
    } 
 
    private void computeRect(final RectF r, View view) {
        // compute current rectangle according to matrix transformation 
        final float w = view.getWidth();
        final float h = view.getHeight();
 
        // use a rectangle at 0,0 to make sure we don't run into issues with scaling