public synchronized void addPath(Path aPath, float aStrokeWidth) { if (fBounds == null) { fBounds = new RectF(); aPath.computeBounds(fBounds, true); } else { aPath.computeBounds(fBoundsTemp, true); fBounds.union(fBoundsTemp); } fPaths.add(new Pair<Path, Float>(aPath, aStrokeWidth)); }
private void invalidateAfterUpdate() { View view = mView.get(); if (view == null || view.getParent() == null) { 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 invalidateAfterUpdate() { View view = mView.get(); if (view == null) { return; } View parent = (View) view.getParent(); if (parent == null) { return; } view.setAnimation(this); final RectF after = mAfter; computeRect(after, view); after.union(mBefore); parent.invalidate( (int) FloatMath.floor(after.left), (int) FloatMath.floor(after.top), (int) FloatMath.ceil(after.right), (int) FloatMath.ceil(after.bottom)); }