am 410e2df4: Merge "CircleFramedDrawable incorrectly has implicit dependency on the hosting view size." into jb-mr2-dev

* commit '410e2df458328d5375b35ef9a610da240293d06b':
  CircleFramedDrawable incorrectly has implicit dependency on the hosting view size.
This commit is contained in:
Svetoslav
2013-04-25 16:58:01 -07:00
committed by Android Git Automerger

View File

@@ -123,12 +123,10 @@ class CircleFramedDrawable extends Drawable {
@Override
public void draw(Canvas canvas) {
// clear background
final float outside = Math.min(canvas.getWidth(), canvas.getHeight());
final float inside = mScale * outside;
final float pad = (outside - inside) / 2f;
final float inside = mScale * mSize;
final float pad = (mSize - inside) / 2f;
mDstRect.set(pad, pad, outside - pad, outside - pad);
mDstRect.set(pad, pad, mSize - pad, mSize - pad);
canvas.drawBitmap(mBitmap, mSrcRect, mDstRect, null);
mFrameRect.set(mDstRect);