Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
gm
smallarc.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2014 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/SkColor.h
"
11
#include "
include/core/SkPaint.h
"
12
#include "
include/core/SkPath.h
"
13
14
// this draws a small arc scaled up
15
// see https://code.google.com/p/chromium/issues/detail?id=102411
16
// and https://code.google.com/p/skia/issues/detail?id=2769
17
DEF_SIMPLE_GM
(smallarc, canvas, 762, 762) {
18
SkPaint
p;
19
p.setColor(
SK_ColorRED
);
20
p.setAntiAlias(
true
);
21
p.setStyle(
SkPaint::kStroke_Style
);
22
p.setStrokeWidth(120);
23
24
SkPath
path;
25
path.moveTo(75, 0);
26
path.cubicTo(33.5, 0, 0, 33.5, 0, 75);
27
28
canvas->translate(-400, -400);
29
canvas->scale(8, 8);
30
canvas->drawPath(path, p);
31
}
SkCanvas.h
SkColor.h
SK_ColorRED
constexpr SkColor SK_ColorRED
Definition
SkColor.h:126
SkPaint.h
SkPath.h
SkPaint
Definition
SkPaint.h:44
SkPaint::kStroke_Style
@ kStroke_Style
set to stroke geometry
Definition
SkPaint.h:194
SkPath
Definition
SkPath.h:59
gm.h
DEF_SIMPLE_GM
#define DEF_SIMPLE_GM(NAME, CANVAS, W, H)
Definition
gm.h:50
Generated on Fri Apr 26 2024 06:16:08 for Flutter Engine by
1.9.8