Skip to content

Commit

Permalink
Use ScaleType.getTransform() instead of util method
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kirwan authored and Facebook Github Bot committed Dec 14, 2016
1 parent 26ed94c commit 14dfb52
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 14dfb52

Please sign in to comment.