OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "SkObjectParser.h" | 9 #include "SkObjectParser.h" |
10 #include "SkData.h" | 10 #include "SkData.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 mRect->appendS32(rect.top()); | 87 mRect->appendS32(rect.top()); |
88 mRect->append(", R: "); | 88 mRect->append(", R: "); |
89 mRect->appendS32(rect.right()); | 89 mRect->appendS32(rect.right()); |
90 mRect->append(", B: "); | 90 mRect->append(", B: "); |
91 mRect->appendS32(rect.bottom()); | 91 mRect->appendS32(rect.bottom()); |
92 return mRect; | 92 return mRect; |
93 } | 93 } |
94 | 94 |
95 SkString* SkObjectParser::MatrixToString(const SkMatrix& matrix) { | 95 SkString* SkObjectParser::MatrixToString(const SkMatrix& matrix) { |
96 SkString* str = new SkString("SkMatrix: "); | 96 SkString* str = new SkString("SkMatrix: "); |
97 #ifdef SK_DEVELOPER | 97 #ifndef SK_IGNORE_TO_STRING |
98 matrix.toString(str); | 98 matrix.toString(str); |
99 #endif | 99 #endif |
100 return str; | 100 return str; |
101 } | 101 } |
102 | 102 |
103 SkString* SkObjectParser::PaintToString(const SkPaint& paint) { | 103 SkString* SkObjectParser::PaintToString(const SkPaint& paint) { |
104 SkString* str = new SkString; | 104 SkString* str = new SkString; |
105 #ifdef SK_DEVELOPER | 105 #ifndef SK_IGNORE_TO_STRING |
106 paint.toString(str); | 106 paint.toString(str); |
107 #endif | 107 #endif |
108 return str; | 108 return str; |
109 } | 109 } |
110 | 110 |
111 SkString* SkObjectParser::PathToString(const SkPath& path) { | 111 SkString* SkObjectParser::PathToString(const SkPath& path) { |
112 SkString* mPath = new SkString("Path ("); | 112 SkString* mPath = new SkString("Path ("); |
113 | 113 |
114 static const char* gFillStrings[] = { | 114 static const char* gFillStrings[] = { |
115 "Winding", "EvenOdd", "InverseWinding", "InverseEvenOdd" | 115 "Winding", "EvenOdd", "InverseWinding", "InverseEvenOdd" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 break; | 364 break; |
365 } | 365 } |
366 default: | 366 default: |
367 decodedText->append("Unknown text encoding."); | 367 decodedText->append("Unknown text encoding."); |
368 break; | 368 break; |
369 } | 369 } |
370 | 370 |
371 return decodedText; | 371 return decodedText; |
372 } | 372 } |
OLD | NEW |