Index: src/core/SkStringUtils.h |
diff --git a/src/core/SkStringUtils.h b/src/core/SkStringUtils.h |
index aa5c809f2cb3e7e725cbdb206b82dcb9a08b3a4a..2839ac2b89990fca1607d2227616d890eda4c634 100644 |
--- a/src/core/SkStringUtils.h |
+++ b/src/core/SkStringUtils.h |
@@ -20,4 +20,19 @@ void SkAddFlagToString(SkString* string, bool flag, |
const char* flagStr, bool* needSeparator); |
+enum SkScalarAsStringType { |
+ kDec_SkScalarAsStringType, |
+ kHex_SkScalarAsStringType, |
+}; |
+ |
+void SkAppendScalar(SkString*, SkScalar, SkScalarAsStringType); |
+ |
+static inline void SkAppendScalarDec(SkString* str, SkScalar value) { |
+ SkAppendScalar(str, value, kDec_SkScalarAsStringType); |
+} |
+ |
+static inline void SkAppendScalarHex(SkString* str, SkScalar value) { |
+ SkAppendScalar(str, value, kHex_SkScalarAsStringType); |
+} |
+ |
#endif |