| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 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 #ifndef SkBitmapProcState_DEFINED | 8 #ifndef SkBitmapProcState_DEFINED |
| 9 #define SkBitmapProcState_DEFINED | 9 #define SkBitmapProcState_DEFINED |
| 10 | 10 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 fX = SkScalarToFractionalInt(pt.x()) - SkFixedToFractionalInt(biasX); | 214 fX = SkScalarToFractionalInt(pt.x()) - SkFixedToFractionalInt(biasX); |
| 215 fY = SkScalarToFractionalInt(pt.y()) - SkFixedToFractionalInt(biasY); | 215 fY = SkScalarToFractionalInt(pt.y()) - SkFixedToFractionalInt(biasY); |
| 216 | 216 |
| 217 if (scalarPoint) { | 217 if (scalarPoint) { |
| 218 scalarPoint->set(pt.x() - SkFixedToScalar(biasX), | 218 scalarPoint->set(pt.x() - SkFixedToScalar(biasX), |
| 219 pt.y() - SkFixedToScalar(biasY)); | 219 pt.y() - SkFixedToScalar(biasY)); |
| 220 } | 220 } |
| 221 } | 221 } |
| 222 | 222 |
| 223 SkFractionalInt x() const { return fX; } | 223 SkFractionalInt fractionalIntX() const { return fX; } |
| 224 SkFractionalInt y() const { return fY; } | 224 SkFractionalInt fractionalIntY() const { return fY; } |
| 225 |
| 226 SkFixed fixedX() const { return SkFractionalIntToFixed(fX); } |
| 227 SkFixed fixedY() const { return SkFractionalIntToFixed(fY); } |
| 228 |
| 229 int intX() const { return SkFractionalIntToInt(fX); } |
| 230 int intY() const { return SkFractionalIntToInt(fY); } |
| 225 | 231 |
| 226 private: | 232 private: |
| 227 SkFractionalInt fX, fY; | 233 SkFractionalInt fX, fY; |
| 228 }; | 234 }; |
| 229 | 235 |
| 230 #endif | 236 #endif |
| OLD | NEW |