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 169 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 } |
| 190 |
| 191 DEF_SIMPLE_GM(bug593049, canvas, 300, 300) { |
| 192 canvas->translate(111, 0); |
| 193 |
| 194 SkPath p; |
| 195 p.moveTo(-43.44464063610148f, 79.43535936389853f); |
| 196 const SkScalar yOffset = 122.88f; |
| 197 const SkScalar radius = 61.44f; |
| 198 SkRect oval = SkRect::MakeXYWH(-radius, yOffset - radius, 2 * radius, 2 * ra
dius); |
| 199 p.arcTo(oval, 1.25f * 180, .5f * 180, false); |
| 200 |
| 201 SkPaint paint; |
| 202 paint.setStyle(SkPaint::kStroke_Style); |
| 203 paint.setStrokeCap(SkPaint::kRound_Cap); |
| 204 paint.setStrokeWidth(15.36f); |
| 205 |
| 206 canvas->drawPath(p, paint); |
| 207 } |
OLD | NEW |