Chromium Code Reviews| Index: src/core/SkPaint.cpp |
| diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp |
| index c3f217cefc60e5501e08a88755b5f537dbcb956c..0cb9eff90520a9105cf95c3f482a39d75f5a63ce 100644 |
| --- a/src/core/SkPaint.cpp |
| +++ b/src/core/SkPaint.cpp |
| @@ -1296,6 +1296,8 @@ SkScalar SkPaint::getFontMetrics(FontMetrics* metrics, SkScalar zoom) const { |
| metrics->fXMin = SkScalarMul(metrics->fXMin, scale); |
| metrics->fXMax = SkScalarMul(metrics->fXMax, scale); |
| metrics->fXHeight = SkScalarMul(metrics->fXHeight, scale); |
| + metrics->fUnderlineThickness = SkScalarMul(metrics->fUnderlineThickness, scale); |
| + metrics->fUnderlinePosition = SkScalarMul(metrics->fUnderlinePosition, scale); |
| } |
| return metrics->fDescent - metrics->fAscent + metrics->fLeading; |
| } |
| @@ -2257,6 +2259,18 @@ const SkRect& SkPaint::doComputeFastBounds(const SkRect& origSrc, |
| return *storage; |
| } |
| +void SkPaint::FontMetrics::setFontMetricsFlag(FontMetrics::FontMetricsFlags flag) { |
| + fFontMetricsFlag |= flag; |
| +} |
| + |
| +void SkPaint::FontMetrics::unsetFontMetricsFlag(FontMetrics::FontMetricsFlags flag) { |
| + fFontMetricsFlag &= ~flag; |
| +} |
| + |
| +bool SkPaint::FontMetrics::checkFontMetricsFlag(FontMetrics::FontMetricsFlags flag) const { |
| + return SkToBool(fFontMetricsFlag & flag); |
|
bungeman-skia
2014/02/20 16:52:46
If going with the uint32_t version of these, the s
|
| +} |
| + |
| #ifdef SK_DEVELOPER |
| void SkPaint::toString(SkString* str) const { |
| str->append("<dl><dt>SkPaint:</dt><dd><dl>"); |