Created
October 30, 2013 21:24
-
-
Save matux/7240542 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- final float wd = w - d.getIntrinsicWidth(); | |
- final float wdDiv2 = wd / 2; | |
+ final float wd = (getWidth() / 2) - (w / 2); | |
final RectF r1 = new RectF(0, offset, d.getIntrinsicWidth(), d.getIntrinsicHeight()); | |
- final RectF r2 = new RectF(-wdDiv2, 0, d.getIntrinsicWidth() + wdDiv2, getHeight()); | |
+ final RectF r2 = new RectF(wd, 0, getWidth() - wd, getHeight()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment