From 14dfb525a2cd6d59abbd0a972cef9d2fd2f9dcdd Mon Sep 17 00:00:00 2001 From: Kirwan Lyster Date: Wed, 14 Dec 2016 07:32:35 -0800 Subject: [PATCH] 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 --- .../java/com/facebook/react/views/image/ReactImageView.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java b/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java index a30d1c865..09de651a9 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.java @@ -87,14 +87,13 @@ public class ReactImageView extends GenericDraweeView { private class RoundedCornerPostprocessor extends BasePostprocessor { void getRadii(Bitmap source, float[] computedCornerRadii, float[] mappedRadii) { - ScalingUtils.getTransform( + mScaleType.getTransform( sMatrix, new Rect(0, 0, source.getWidth(), source.getHeight()), source.getWidth(), source.getHeight(), 0.0f, - 0.0f, - mScaleType); + 0.0f); sMatrix.invert(sInverse); mappedRadii[0] = sInverse.mapRadius(computedCornerRadii[0]);