| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 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 SkScalerContext_DEFINED | 8 #ifndef SkScalerContext_DEFINED |
| 9 #define SkScalerContext_DEFINED | 9 #define SkScalerContext_DEFINED |
| 10 | 10 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 * underlying library will not be used, often when working directly with fo
nt data. | 139 * underlying library will not be used, often when working directly with fo
nt data. |
| 140 * | 140 * |
| 141 * The parameters 'scale' and 'remaining' are required, the other pointers
may be nullptr. | 141 * The parameters 'scale' and 'remaining' are required, the other pointers
may be nullptr. |
| 142 * | 142 * |
| 143 * @param preMatrixScale the kind of scale to extract from the total matrix
. | 143 * @param preMatrixScale the kind of scale to extract from the total matrix
. |
| 144 * @param scale the scale extracted from the total matrix (both values posi
tive). | 144 * @param scale the scale extracted from the total matrix (both values posi
tive). |
| 145 * @param remaining apply after scale to apply the total matrix. | 145 * @param remaining apply after scale to apply the total matrix. |
| 146 * @param remainingWithoutRotation apply after scale to apply the total mat
rix sans rotation. | 146 * @param remainingWithoutRotation apply after scale to apply the total mat
rix sans rotation. |
| 147 * @param remainingRotation apply after remainingWithoutRotation to apply t
he total matrix. | 147 * @param remainingRotation apply after remainingWithoutRotation to apply t
he total matrix. |
| 148 * @param total the total matrix. | 148 * @param total the total matrix. |
| 149 * @return false if the matrix was singular. The output will be valid but n
ot invertable. |
| 149 */ | 150 */ |
| 150 void computeMatrices(PreMatrixScale preMatrixScale, | 151 bool computeMatrices(PreMatrixScale preMatrixScale, |
| 151 SkVector* scale, SkMatrix* remaining, | 152 SkVector* scale, SkMatrix* remaining, |
| 152 SkMatrix* remainingWithoutRotation = nullptr, | 153 SkMatrix* remainingWithoutRotation = nullptr, |
| 153 SkMatrix* remainingRotation = nullptr, | 154 SkMatrix* remainingRotation = nullptr, |
| 154 SkMatrix* total = nullptr); | 155 SkMatrix* total = nullptr); |
| 155 | 156 |
| 156 inline SkPaint::Hinting getHinting() const; | 157 inline SkPaint::Hinting getHinting() const; |
| 157 inline void setHinting(SkPaint::Hinting); | 158 inline void setHinting(SkPaint::Hinting); |
| 158 | 159 |
| 159 SkMask::Format getFormat() const { | 160 SkMask::Format getFormat() const { |
| 160 return static_cast<SkMask::Format>(fMaskFormat); | 161 return static_cast<SkMask::Format>(fMaskFormat); |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 return static_cast<SkPaint::Hinting>(hint); | 381 return static_cast<SkPaint::Hinting>(hint); |
| 381 } | 382 } |
| 382 | 383 |
| 383 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 384 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
| 384 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 385 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
| 385 (hinting << SkScalerContext::kHinting_Shift); | 386 (hinting << SkScalerContext::kHinting_Shift); |
| 386 } | 387 } |
| 387 | 388 |
| 388 | 389 |
| 389 #endif | 390 #endif |
| OLD | NEW |