| Index: src/core/SkScalerContext.h
|
| diff --git a/src/core/SkScalerContext.h b/src/core/SkScalerContext.h
|
| index 302698ee4e581548179bea34ed021af4bc4a87fa..49a79b13a91e8decd342a496221ae01feaee4668 100644
|
| --- a/src/core/SkScalerContext.h
|
| +++ b/src/core/SkScalerContext.h
|
| @@ -20,6 +20,12 @@ class SkMaskFilter;
|
| class SkPathEffect;
|
| class SkRasterizer;
|
|
|
| +enum SkAxisAlignment {
|
| + kNone_SkAxisAlignment,
|
| + kX_SkAxisAlignment,
|
| + kY_SkAxisAlignment
|
| +};
|
| +
|
| /*
|
| * To allow this to be forward-declared, it must be its own typename, rather
|
| * than a nested struct inside SkScalerContext (where it started).
|
| @@ -245,6 +251,15 @@ public:
|
|
|
| const Rec& getRec() const { return fRec; }
|
|
|
| + /**
|
| + * Return the axis (if any) that the baseline for horizontal text should land on.
|
| + * As an example, the identity matrix will return kX_SkAxisAlignment
|
| + * If glyphs landing on the baseline is not significant (no hinting), returns
|
| + * kNone_SkAxisAlignment.
|
| + */
|
| + SkAxisAlignment computeAxisAlignmentForHText();
|
| +
|
| +
|
| protected:
|
| Rec fRec;
|
|
|
| @@ -340,22 +355,6 @@ private:
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -enum SkAxisAlignment {
|
| - kNone_SkAxisAlignment,
|
| - kX_SkAxisAlignment,
|
| - kY_SkAxisAlignment
|
| -};
|
| -
|
| -/**
|
| - * Return the axis (if any) that the baseline for horizontal text will land on
|
| - * after running through the specified matrix.
|
| - *
|
| - * As an example, the identity matrix will return kX_SkAxisAlignment
|
| - */
|
| -SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix);
|
| -
|
| -///////////////////////////////////////////////////////////////////////////////
|
| -
|
| SkPaint::Hinting SkScalerContextRec::getHinting() const {
|
| unsigned hint = (fFlags & SkScalerContext::kHinting_Mask) >>
|
| SkScalerContext::kHinting_Shift;
|
|
|