Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
gm
crbug_691386.cpp
Go to the documentation of this file.
1
/*
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
8
#include "
gm/gm.h
"
9
#include "
include/core/SkCanvas.h
"
10
#include "
include/core/SkPaint.h
"
11
#include "
include/core/SkPath.h
"
12
#include "
include/core/SkString.h
"
13
#include "
include/utils/SkParsePath.h
"
14
15
DEF_SIMPLE_GM_CAN_FAIL
(crbug_691386, canvas, errorMsg, 256, 256) {
16
SkPath
path;
17
if
(!
SkParsePath::FromSVGString
(
"M -1 0 A 1 1 0 0 0 1 0 Z"
, &path)) {
18
*errorMsg =
"Failed to parse path."
;
19
return
skiagm::DrawResult::kFail
;
20
}
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);
27
return
skiagm::DrawResult::kOk
;
28
}
SkCanvas.h
SkPaint.h
SkParsePath.h
SkPath.h
SkString.h
SkPaint
Definition
SkPaint.h:44
SkPaint::kStroke_Style
@ kStroke_Style
set to stroke geometry
Definition
SkPaint.h:194
SkParsePath::FromSVGString
static bool FromSVGString(const char str[], SkPath *)
Definition
SkParsePath.cpp:103
SkPath
Definition
SkPath.h:59
gm.h
DEF_SIMPLE_GM_CAN_FAIL
#define DEF_SIMPLE_GM_CAN_FAIL(NAME, CANVAS, ERR_MSG, W, H)
Definition
gm.h:62
skiagm::DrawResult::kFail
@ kFail
skiagm::DrawResult::kOk
@ kOk
Generated on Fri Apr 26 2024 06:16:01 for Flutter Engine by
1.9.8