2 * Copyright 2016 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
13 DEF_SIMPLE_GM(bug5252, canvas, 500, 500) {
14 canvas->translate(SkIntToScalar(10), SkIntToScalar(20));
17 clip1.addOval(SkRect::MakeWH(225, 200));
18 canvas->clipPath(clip1); // bug
21 clip2.addRect(SkRect::MakeWH(220, 200));
22 //canvas->clipPath(clip2); // ok
25 pa.setStyle(SkPaint::kStroke_Style);
26 pa.setAntiAlias(true);
27 pa.setStrokeWidth(1.0f);
28 for (int i = 0; i < 15; i++)
30 for (int j = 0; j < 10; j++)
32 SkAutoCanvasRestore acs(canvas, true);
34 canvas->translate(i * 15.f, j * 20.f);
35 canvas->drawRect(SkRect::MakeXYWH(5, 5, 10, 15),pa);
38 path.cubicTo(14, 10, 13, 12, 10, 12);
39 path.cubicTo(7, 15, 8, 17, 14, 18);
40 canvas->drawPath(path, pa);