Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Unified Diff: src/core/SkStringUtils.h

Issue 801383002: add dumpHex option to rect and rrect, to match path (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkRect.cpp ('k') | src/core/SkStringUtils.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/core/SkRect.cpp ('k') | src/core/SkStringUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698