Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: src/core/SkRRect.cpp

Issue 951323004: Fix radii scaling bug in SkRRect::setNinePatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/RoundRectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRRect.cpp
diff --git a/src/core/SkRRect.cpp b/src/core/SkRRect.cpp
index 788bf1d9a693c98084249ed08ad9ed9e32a9801a..f2927644daabd40dbbe79f6964f2dfe305e56748 100644
--- a/src/core/SkRRect.cpp
+++ b/src/core/SkRRect.cpp
@@ -69,7 +69,7 @@ void SkRRect::setNinePatch(const SkRect& rect, SkScalar leftRad, SkScalar topRad
scale = SkScalarDiv(rect.width(), leftRad + rightRad);
}
if (topRad + bottomRad > rect.height()) {
- scale = SkMinScalar(scale, SkScalarDiv(rect.width(), leftRad + rightRad));
+ scale = SkMinScalar(scale, SkScalarDiv(rect.height(), topRad + bottomRad));
}
if (scale < SK_Scalar1) {
« no previous file with comments | « no previous file | tests/RoundRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698