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

Unified Diff: src/core/SkImageFilter.cpp

Issue 1234873005: Rename right & bottom crop edges to width & height. (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Update to ToT; fix tests Created 5 years, 5 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 | « include/core/SkImageFilter.h ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index fb7d8b28c098482719341b15aab42a63b61f3be7..75f601ebdbea6ebfc916a8592e1bc99d810d2420 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -50,13 +50,13 @@ void SkImageFilter::CropRect::toString(SkString* str) const {
} else {
str->appendf("X, ");
}
- if (fFlags & CropRect::kHasRight_CropEdge) {
- str->appendf("%.2f, ", fRect.fRight);
+ if (fFlags & CropRect::kHasWidth_CropEdge) {
+ str->appendf("%.2f, ", fRect.width());
} else {
str->appendf("X, ");
}
- if (fFlags & CropRect::kHasBottom_CropEdge) {
- str->appendf("%.2f", fRect.fBottom);
+ if (fFlags & CropRect::kHasHeight_CropEdge) {
+ str->appendf("%.2f", fRect.height());
} else {
str->appendf("X");
}
@@ -79,10 +79,10 @@ bool SkImageFilter::CropRect::applyTo(const SkIRect& imageBounds, const Context&
if (fFlags & kHasTop_CropEdge) {
cropped->fTop = devICropR.fTop;
}
- if (fFlags & kHasRight_CropEdge) {
+ if (fFlags & kHasWidth_CropEdge) {
cropped->fRight = cropped->fLeft + devICropR.width();
}
- if (fFlags & kHasBottom_CropEdge) {
+ if (fFlags & kHasHeight_CropEdge) {
cropped->fBottom = cropped->fTop + devICropR.height();
}
}
« no previous file with comments | « include/core/SkImageFilter.h ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698