| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 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 SkSize_DEFINED | 8 #ifndef SkSize_DEFINED |
| 9 #define SkSize_DEFINED | 9 #define SkSize_DEFINED |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 | 84 |
| 85 | 85 |
| 86 SkSize& operator=(const SkISize& src) { | 86 SkSize& operator=(const SkISize& src) { |
| 87 this->set(SkIntToScalar(src.fWidth), SkIntToScalar(src.fHeight)); | 87 this->set(SkIntToScalar(src.fWidth), SkIntToScalar(src.fHeight)); |
| 88 return *this; | 88 return *this; |
| 89 } | 89 } |
| 90 | 90 |
| 91 SkISize toRound() const { | 91 SkISize toRound() const { |
| 92 SkISize s; | 92 SkISize s; |
| 93 s.set(SkScalarRound(fWidth), SkScalarRound(fHeight)); | 93 s.set(SkScalarRoundToInt(fWidth), SkScalarRoundToInt(fHeight)); |
| 94 return s; | 94 return s; |
| 95 } | 95 } |
| 96 | 96 |
| 97 SkISize toCeil() const { | 97 SkISize toCeil() const { |
| 98 SkISize s; | 98 SkISize s; |
| 99 s.set(SkScalarCeil(fWidth), SkScalarCeil(fHeight)); | 99 s.set(SkScalarCeilToInt(fWidth), SkScalarCeilToInt(fHeight)); |
| 100 return s; | 100 return s; |
| 101 } | 101 } |
| 102 | 102 |
| 103 SkISize toFloor() const { | 103 SkISize toFloor() const { |
| 104 SkISize s; | 104 SkISize s; |
| 105 s.set(SkScalarFloor(fWidth), SkScalarFloor(fHeight)); | 105 s.set(SkScalarFloorToInt(fWidth), SkScalarFloorToInt(fHeight)); |
| 106 return s; | 106 return s; |
| 107 } | 107 } |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 #endif | 110 #endif |
| OLD | NEW |