aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-24 15:38:46 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-08-24 15:38:46 +0000
commit2e68478d8654c8a4048b45ad16ac039dadb25c33 (patch)
tree69e7f761c6e7dc7c58d66bdbfbe499d3385be7e7 /src/core
parentb6ddf7a0826b1c31a544ffaa79d5803f14b59c7c (diff)
move SkComputeAxisAlignmentForHText(const SkMatrix& matrix) out of inline,
since that isn't really necessary, and it is generating a warning/error for some builds ('defined but not used') git-svn-id: http://skia.googlecode.com/svn/trunk@2169 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkScalerContext.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
index a7cfb055f1..a8147198a7 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"