| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 SkString* SkObjectParser::PaintToString(const SkPaint& paint) { | 128 SkString* SkObjectParser::PaintToString(const SkPaint& paint) { |
| 129 SkString* str = new SkString; | 129 SkString* str = new SkString; |
| 130 #ifndef SK_IGNORE_TO_STRING | 130 #ifndef SK_IGNORE_TO_STRING |
| 131 paint.toString(str); | 131 paint.toString(str); |
| 132 #endif | 132 #endif |
| 133 return str; | 133 return str; |
| 134 } | 134 } |
| 135 | 135 |
| 136 SkString* SkObjectParser::PathToString(const SkPath& path) { | 136 SkString* SkObjectParser::PathToString(const SkPath& path) { |
| 137 SkString* mPath = new SkString("Path ("); | 137 SkString* mPath = new SkString; |
| 138 |
| 139 mPath->appendf("Path (%d) (", path.getGenerationID()); |
| 138 | 140 |
| 139 static const char* gFillStrings[] = { | 141 static const char* gFillStrings[] = { |
| 140 "Winding", "EvenOdd", "InverseWinding", "InverseEvenOdd" | 142 "Winding", "EvenOdd", "InverseWinding", "InverseEvenOdd" |
| 141 }; | 143 }; |
| 142 | 144 |
| 143 mPath->append(gFillStrings[path.getFillType()]); | 145 mPath->append(gFillStrings[path.getFillType()]); |
| 144 mPath->append(", "); | 146 mPath->append(", "); |
| 145 | 147 |
| 146 static const char* gConvexityStrings[] = { | 148 static const char* gConvexityStrings[] = { |
| 147 "Unknown", "Convex", "Concave" | 149 "Unknown", "Convex", "Concave" |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } | 386 } |
| 385 break; | 387 break; |
| 386 } | 388 } |
| 387 default: | 389 default: |
| 388 decodedText->append("Unknown text encoding."); | 390 decodedText->append("Unknown text encoding."); |
| 389 break; | 391 break; |
| 390 } | 392 } |
| 391 | 393 |
| 392 return decodedText; | 394 return decodedText; |
| 393 } | 395 } |
| OLD | NEW |