OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
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 | 9 |
10 #include "SkBuffer.h" | 10 #include "SkBuffer.h" |
(...skipping 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2043 for (int i = 0; i < count; ++i) { | 2043 for (int i = 0; i < count; ++i) { |
2044 append_scalar(str, values[i], dumpAsHex); | 2044 append_scalar(str, values[i], dumpAsHex); |
2045 if (i < count - 1) { | 2045 if (i < count - 1) { |
2046 str->append(", "); | 2046 str->append(", "); |
2047 } | 2047 } |
2048 } | 2048 } |
2049 if (conicWeight >= 0) { | 2049 if (conicWeight >= 0) { |
2050 str->append(", "); | 2050 str->append(", "); |
2051 append_scalar(str, conicWeight, dumpAsHex); | 2051 append_scalar(str, conicWeight, dumpAsHex); |
2052 } | 2052 } |
2053 str->append(");\n"); | 2053 str->append(");"); |
| 2054 if (dumpAsHex) { |
| 2055 str->append(" // "); |
| 2056 for (int i = 0; i < count; ++i) { |
| 2057 append_scalar(str, values[i], false); |
| 2058 if (i < count - 1) { |
| 2059 str->append(", "); |
| 2060 } |
| 2061 } |
| 2062 if (conicWeight >= 0) { |
| 2063 str->append(", "); |
| 2064 append_scalar(str, conicWeight, false); |
| 2065 } |
| 2066 } |
| 2067 str->append("\n"); |
2054 } | 2068 } |
2055 | 2069 |
2056 void SkPath::dump(SkWStream* wStream, bool forceClose, bool dumpAsHex) const { | 2070 void SkPath::dump(SkWStream* wStream, bool forceClose, bool dumpAsHex) const { |
2057 Iter iter(*this, forceClose); | 2071 Iter iter(*this, forceClose); |
2058 SkPoint pts[4]; | 2072 SkPoint pts[4]; |
2059 Verb verb; | 2073 Verb verb; |
2060 | 2074 |
2061 if (!wStream) { | 2075 if (!wStream) { |
2062 SkDebugf("path: forceClose=%s\n", forceClose ? "true" : "false"); | 2076 SkDebugf("path: forceClose=%s\n", forceClose ? "true" : "false"); |
2063 } | 2077 } |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2844 switch (this->getFillType()) { | 2858 switch (this->getFillType()) { |
2845 case SkPath::kEvenOdd_FillType: | 2859 case SkPath::kEvenOdd_FillType: |
2846 case SkPath::kInverseEvenOdd_FillType: | 2860 case SkPath::kInverseEvenOdd_FillType: |
2847 w &= 1; | 2861 w &= 1; |
2848 break; | 2862 break; |
2849 default: | 2863 default: |
2850 break; | 2864 break; |
2851 } | 2865 } |
2852 return SkToBool(w); | 2866 return SkToBool(w); |
2853 } | 2867 } |
OLD | NEW |