OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BD-style license that can be | 4 * Use of this source code is governed by a BD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "gm.h" | 8 #include "gm.h" |
9 #include "SkParsePath.h" | 9 #include "SkParsePath.h" |
10 #include "SkPath.h" | 10 #include "SkPath.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 path.arcTo(80, 80, 0, SkPath::kLarge_ArcSize, SkPath::kCW_Direction, 200, 10
0); | 102 path.arcTo(80, 80, 0, SkPath::kLarge_ArcSize, SkPath::kCW_Direction, 200, 10
0); |
103 canvas->drawPath(path, paint); | 103 canvas->drawPath(path, paint); |
104 } | 104 } |
105 | 105 |
106 #include "random_parse_path.h" | 106 #include "random_parse_path.h" |
107 #include "SkRandom.h" | 107 #include "SkRandom.h" |
108 | 108 |
109 /* The test below generates a reference image using SVG. To compare the result f
or correctness, | 109 /* The test below generates a reference image using SVG. To compare the result f
or correctness, |
110 enable the define below and then view the generated SVG in a browser. | 110 enable the define below and then view the generated SVG in a browser. |
111 */ | 111 */ |
112 #define GENERATE_SVG_REFERENCE 01 | 112 #define GENERATE_SVG_REFERENCE 0 |
113 | 113 |
114 #if GENERATE_SVG_REFERENCE | 114 #if GENERATE_SVG_REFERENCE |
115 #include "SkOSFile.h" | 115 #include "SkOSFile.h" |
116 #endif | 116 #endif |
117 | 117 |
118 enum { | 118 enum { |
119 kParsePathTestDimension = 500 | 119 kParsePathTestDimension = 500 |
120 }; | 120 }; |
121 | 121 |
122 DEF_SIMPLE_GM(parsedpaths, canvas, kParsePathTestDimension, kParsePathTestDimens
ion) { | 122 DEF_SIMPLE_GM(parsedpaths, canvas, kParsePathTestDimension, kParsePathTestDimens
ion) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 canvas->restore(); | 181 canvas->restore(); |
182 canvas->translate(100, 0); | 182 canvas->translate(100, 0); |
183 } | 183 } |
184 #if GENERATE_SVG_REFERENCE | 184 #if GENERATE_SVG_REFERENCE |
185 const char trailer[] = "</svg>\n"; | 185 const char trailer[] = "</svg>\n"; |
186 sk_fwrite(trailer, sizeof(trailer) - 1, file); | 186 sk_fwrite(trailer, sizeof(trailer) - 1, file); |
187 sk_fclose(file); | 187 sk_fclose(file); |
188 #endif | 188 #endif |
189 } | 189 } |
OLD | NEW |