blob: 4e8b0902cb4fe42b7e968c97a2400d44f7aa3c9c [file] [log] [blame]
Hal Canary385468f2017-02-13 11:03:23 -05001/*
2 * Copyright 2017 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
Mike Kleinc0bd9f92019-04-23 12:05:21 -05008#include "gm/gm.h"
Ben Wagner7fde8e12019-05-01 17:28:53 -04009#include "include/core/SkCanvas.h"
10#include "include/core/SkPaint.h"
11#include "include/core/SkPath.h"
12#include "include/core/SkString.h"
Mike Kleinc0bd9f92019-04-23 12:05:21 -050013#include "include/utils/SkParsePath.h"
Hal Canary385468f2017-02-13 11:03:23 -050014
Chris Dalton50e24d72019-02-07 16:20:09 -070015DEF_SIMPLE_GM_CAN_FAIL(crbug_691386, canvas, errorMsg, 256, 256) {
Hal Canary385468f2017-02-13 11:03:23 -050016 SkPath path;
17 if (!SkParsePath::FromSVGString("M -1 0 A 1 1 0 0 0 1 0 Z", &path)) {
Chris Dalton50e24d72019-02-07 16:20:09 -070018 *errorMsg = "Failed to parse path.";
19 return skiagm::DrawResult::kFail;
Hal Canary385468f2017-02-13 11:03:23 -050020 }
21 SkPaint p;
22 p.setStyle(SkPaint::kStroke_Style);
23 p.setStrokeWidth(0.025f);
24 canvas->scale(96.0f, 96.0f);
25 canvas->translate(1.25f, 1.25f);
26 canvas->drawPath(path, p);
Chris Dalton50e24d72019-02-07 16:20:09 -070027 return skiagm::DrawResult::kOk;
Hal Canary385468f2017-02-13 11:03:23 -050028}