32 SkISize getISize()
override {
return {1240, 390}; }
34 void onDraw(
SkCanvas* canvas)
override {
37 path.cubicTo(140, 150, 40, 10, 170, 150);
42 for (
SkScalar dy = -1; dy <= 1; dy += 1) {
63 SkISize getISize()
override {
return {1240, 390}; }
65 void onDraw(
SkCanvas* canvas)
override {
99 void onOnceBeforeDraw()
override {
100 fPath.
moveTo(69.7030518991886f, 0);
101 fPath.
cubicTo( 69.7030518991886f, 21.831149999999997f,
102 58.08369508178456f, 43.66448333333333f, 34.8449814469765f, 65.5f);
103 fPath.
cubicTo( 11.608591683531916f, 87.33115f, -0.010765133872116195f, 109.16448333333332f,
104 -0.013089005235602302f, 131);
125 SkISize getISize()
override {
return {1240, 390}; }
131 path.setFillType(fill);
133 paint.setStrokeCap(cap);
137 paint.setStyle(style);
144 void onDraw(
SkCanvas* canvas)
override {
149 constexpr FillAndName gFills[] = {
155 struct StyleAndName {
159 constexpr StyleAndName
gStyles[] = {
169 constexpr CapAndName gCaps[] = {
183 path.fName =
"moveTo-cubic";
189 const char title[] =
"Cubic Drawn Into Rectangle Clips With "
190 "Indicated Style, Fill and Linecaps, with stroke width 10";
198 for (
size_t cap = 0; cap <
std::size(gCaps); ++cap) {
203 for (
size_t fill = 0; fill <
std::size(gFills); ++fill) {
215 gCaps[cap].fCap, gCaps[cap].fJoin,
gStyles[style].fStyle,
244 SkISize getISize()
override {
return {1240, 390}; }
250 path.setFillType(fill);
252 paint.setStrokeCap(cap);
256 paint.setStyle(style);
263 void onDraw(
SkCanvas* canvas)
override {
268 constexpr FillAndName gFills[] = {
274 struct StyleAndName {
278 constexpr StyleAndName
gStyles[] = {
288 constexpr CapAndName gCaps[] = {
303 path.fName =
"moveTo-cubic-close";
309 const char title[] =
"Cubic Closed Drawn Into Rectangle Clips With "
310 "Indicated Style, Fill and Linecaps, with stroke width 10";
318 for (
size_t cap = 0; cap <
std::size(gCaps); ++cap) {
323 for (
size_t fill = 0; fill <
std::size(gFills); ++fill) {
335 gCaps[cap].fCap, gCaps[cap].fJoin,
gStyles[style].fStyle,
365 SkISize getISize()
override {
return {1240, 390}; }
376 path.setFillType(fill);
379 paint.setStrokeCap(cap);
384 paint.setStyle(style);
391 void onDraw(
SkCanvas* canvas)
override {
396 constexpr FillAndName gFills[] = {
402 struct StyleAndName {
406 constexpr StyleAndName
gStyles[] = {
416 constexpr CapAndName gCaps[] = {
430 path.fName =
"moveTo-cubic";
436 const char title[] =
"Cubic Drawn Into Rectangle Clips With "
437 "Indicated Style, Fill and Linecaps, with stroke width 10";
445 for (
size_t cap = 0; cap <
std::size(gCaps); ++cap) {
450 for (
size_t fill = 0; fill <
std::size(gFills); ++fill) {
461 this->drawPath(
path.fPath, canvas,
rect,
462 gCaps[cap].fCap, gCaps[cap].fJoin,
gStyles[style].fStyle,
491 p.setAntiAlias(
true);
493 p.setStrokeWidth(10);
497 path.cubicTo(31.5f, 1.5f, 3.5f, 4.5f, 29, 29);
498 canvas->drawPath(
path,
p);
504 p.setAntiAlias(
true);
506 p.setStrokeWidth(15);
507 canvas->translate(-500, -130);
509 path.moveTo(500.988f, 155.200f);
510 path.lineTo(526.109f, 155.200f);
511 SkPoint p1 = { 526.109f, 155.200f };
512 SkPoint p2 = { 525.968f, 212.968f };
513 SkPoint p3 = { 526.109f, 241.840f };
514 path.cubicTo(p1, p2, p3);
515 canvas->drawPath(
path,
p);
516 canvas->translate(50, 0);
518 p2.
set(525.968f, 213.172f);
519 path.moveTo(500.988f, 155.200f);
520 path.lineTo(526.109f, 155.200f);
521 path.cubicTo(p1, p2, p3);
522 canvas->drawPath(
path,
p);
SkStrokeRec::Style fStyle
static const int strokeWidth
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawPath(const SkPath &path, const SkPaint &paint)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
@ kButt_Cap
no stroke extension
void setStyle(Style style)
void setColor(SkColor color)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
@ kStrokeAndFill_Style
sets to stroke and fill geometry
@ kBevel_Join
connects outside edges
void setStrokeWidth(SkScalar width)
SkPath & moveTo(SkScalar x, SkScalar y)
SkPath & cubicTo(SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkScalar x3, SkScalar y3)
void transform(const SkMatrix &matrix, SkPath *dst, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
DEF_SIMPLE_GM(bug5099, canvas, 50, 50)
unsigned useCenter Optional< SkMatrix > matrix
Optional< SkRect > bounds
sk_sp< SkBlender > blender SkRect rect
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
font
Font Metadata and Metrics.
static constexpr SkPoint kPts[kPtsCount]
static SkString join(const CommandLineFlags::StringArray &)
void set(float x, float y)
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
static constexpr SkFontStyle gStyles[]