diff --git a/include/core/SkScalerContext.h b/include/core/SkScalerContext.h index e2ce537de..b32128904 100644 --- a/include/core/SkScalerContext.h +++ b/include/core/SkScalerContext.h @@ -307,17 +307,7 @@ enum SkAxisAlignment { * * As an example, the identity matrix will return kX_SkAxisAlignment */ -static SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix) { - SkASSERT(!matrix.hasPerspective()); - - if (0 == matrix[SkMatrix::kMSkewY]) { - return kX_SkAxisAlignment; - } - if (0 == matrix[SkMatrix::kMScaleX]) { - return kY_SkAxisAlignment; - } - return kNone_SkAxisAlignment; -} +SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix); #endif diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index a7cfb055f..a8147198a 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -710,6 +710,18 @@ void SkScalerContext::Rec::getSingleMatrix(SkMatrix* m) const { m->postConcat(deviceMatrix); } +SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix) { + SkASSERT(!matrix.hasPerspective()); + + if (0 == matrix[SkMatrix::kMSkewY]) { + return kX_SkAxisAlignment; + } + if (0 == matrix[SkMatrix::kMScaleX]) { + return kY_SkAxisAlignment; + } + return kNone_SkAxisAlignment; +} + /////////////////////////////////////////////////////////////////////////////// #include "SkFontHost.h"