Use ScaleType.getTransform() instead of util method
Summary: This changes ReactImageView to pull the transform matrix for rounding from the scale type itself instead of a utility method that forwards to the same thing. Reviewed By: lambdapioneer Differential Revision: D4326549 fbshipit-source-id: 82e59e3c20f83beb1d454743e6dbbce8666de8a3
This commit is contained in:
parent
26ed94c0fd
commit
14dfb525a2
|
@ -87,14 +87,13 @@ public class ReactImageView extends GenericDraweeView {
|
||||||
private class RoundedCornerPostprocessor extends BasePostprocessor {
|
private class RoundedCornerPostprocessor extends BasePostprocessor {
|
||||||
|
|
||||||
void getRadii(Bitmap source, float[] computedCornerRadii, float[] mappedRadii) {
|
void getRadii(Bitmap source, float[] computedCornerRadii, float[] mappedRadii) {
|
||||||
ScalingUtils.getTransform(
|
mScaleType.getTransform(
|
||||||
sMatrix,
|
sMatrix,
|
||||||
new Rect(0, 0, source.getWidth(), source.getHeight()),
|
new Rect(0, 0, source.getWidth(), source.getHeight()),
|
||||||
source.getWidth(),
|
source.getWidth(),
|
||||||
source.getHeight(),
|
source.getHeight(),
|
||||||
0.0f,
|
0.0f,
|
||||||
0.0f,
|
0.0f);
|
||||||
mScaleType);
|
|
||||||
sMatrix.invert(sInverse);
|
sMatrix.invert(sInverse);
|
||||||
|
|
||||||
mappedRadii[0] = sInverse.mapRadius(computedCornerRadii[0]);
|
mappedRadii[0] = sInverse.mapRadius(computedCornerRadii[0]);
|
||||||
|
|
Loading…
Reference in New Issue