OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The Android Open Source Project | 2 * Copyright 2012 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkMagnifierImageFilter.h" | 9 #include "SkMagnifierImageFilter.h" |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 350 |
351 int x_val = SkPin32(SkScalarFloorToInt(x_interp), 0, width - 1); | 351 int x_val = SkPin32(SkScalarFloorToInt(x_interp), 0, width - 1); |
352 int y_val = SkPin32(SkScalarFloorToInt(y_interp), 0, height - 1); | 352 int y_val = SkPin32(SkScalarFloorToInt(y_interp), 0, height - 1); |
353 | 353 |
354 *dptr = sptr[y_val * width + x_val]; | 354 *dptr = sptr[y_val * width + x_val]; |
355 dptr++; | 355 dptr++; |
356 } | 356 } |
357 } | 357 } |
358 return true; | 358 return true; |
359 } | 359 } |
| 360 |
| 361 #ifndef SK_IGNORE_TO_STRING |
| 362 void SkMagnifierImageFilter::toString(SkString* str) const { |
| 363 str->appendf("SkMagnifierImageFilter: ("); |
| 364 str->appendf("src: (%f,%f,%f,%f) ", |
| 365 fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBotto
m); |
| 366 str->appendf("inset: %f", fInset); |
| 367 str->append(")"); |
| 368 } |
| 369 #endif |
OLD | NEW |