1 /*
2  * Copyright 2018 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #include "gm.h"
9 #include "SkCanvas.h"
10 #include "SkPath.h"
11 
12 DEF_SIMPLE_GM(path_huge_crbug_800804, canvas, 50, 600) {
13     SkPaint paint;
14     paint.setAntiAlias(true);
15     paint.setStyle(SkPaint::kStroke_Style);
16 
17     // exercise various special-cases (e.g. hairlines or not)
18     const float widths[] = { 0.9f, 1.0f, 1.1f };
19 
20     SkPath path;
21     for (float w : widths) {
22         paint.setStrokeWidth(w);
23 
24         path.reset();
25         path.moveTo(-1000,12345678901234567890.f);
26         path.lineTo(10.5f,200);
27         canvas->drawPath(path, paint);
28 
29         path.reset();
30         path.moveTo(30.5f,400);
31         path.lineTo(1000,-9.8765432109876543210e+19f);
32         canvas->drawPath(path, paint);
33 
34         canvas->translate(3, 0);
35     }
36 }
37 
38