aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkFDot6.h
diff options
context:
space:
mode:
authorGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-25 20:38:28 +0000
committerGravatar bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-25 20:38:28 +0000
commit8ff8a1959f514b969198ec2242c7de57fbf413cd (patch)
treea862cbe89d8ba4488a92dac63ebe408bdbe40fb4 /src/core/SkFDot6.h
parente0e71afc66ee350383486c10e6c760a86663dfcc (diff)
Vertical metrics for FreeType.
Diffstat (limited to 'src/core/SkFDot6.h')
-rw-r--r--src/core/SkFDot6.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/SkFDot6.h b/src/core/SkFDot6.h
index aa588572f8..9b8e4d05ad 100644
--- a/src/core/SkFDot6.h
+++ b/src/core/SkFDot6.h
@@ -10,6 +10,7 @@
#ifndef SkFDot6_DEFINED
#define SkFDot6_DEFINED
+#include "SkScalar.h"
#include "SkMath.h"
typedef int32_t SkFDot6;
@@ -40,8 +41,10 @@ inline SkFixed SkFDot6ToFixed(SkFDot6 x) {
#ifdef SK_SCALAR_IS_FLOAT
#define SkScalarToFDot6(x) (SkFDot6)((x) * 64)
+ #define SkFDot6ToScalar(x) ((SkScalar)(x) * SkFloatToScalar(0.015625f))
#else
#define SkScalarToFDot6(x) ((x) >> 10)
+ #define SkFDot6ToScalar(x) ((x) << 10)
#endif
inline SkFixed SkFDot6Div(SkFDot6 a, SkFDot6 b) {