Commit 94d11044 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

Fix the calculation of image heights in ImageFit.scaleDown mode (#4939)

Fixes https://github.com/flutter/flutter/issues/4407
parent 05e200f1
...@@ -869,7 +869,7 @@ void paintImage({ ...@@ -869,7 +869,7 @@ void paintImage({
if (destinationSize.height > outputSize.height) if (destinationSize.height > outputSize.height)
destinationSize = new Size(outputSize.height * aspectRatio, outputSize.height); destinationSize = new Size(outputSize.height * aspectRatio, outputSize.height);
if (destinationSize.width > outputSize.width) if (destinationSize.width > outputSize.width)
destinationSize = new Size(outputSize.width, outputSize.height / aspectRatio); destinationSize = new Size(outputSize.width, outputSize.width / aspectRatio);
break; break;
} }
if (centerSlice != null) { if (centerSlice != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment