You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
651 B
22 lines
651 B
4 months ago
|
// Copyright 2020 Google LLC.
|
||
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
||
|
#include "tools/fiddle/examples.h"
|
||
|
REG_FIDDLE(bezier_curves, 256, 256, false, 5) {
|
||
|
void draw(SkCanvas* canvas) {
|
||
|
canvas->drawColor(SK_ColorWHITE);
|
||
|
|
||
|
SkPaint paint;
|
||
|
paint.setStyle(SkPaint::kStroke_Style);
|
||
|
paint.setStrokeWidth(8);
|
||
|
paint.setColor(0xff4285F4);
|
||
|
paint.setAntiAlias(true);
|
||
|
paint.setStrokeCap(SkPaint::kRound_Cap);
|
||
|
|
||
|
SkPath path;
|
||
|
path.moveTo(10, 10);
|
||
|
path.quadTo(256, 64, 128, 128);
|
||
|
path.quadTo(10, 192, 250, 250);
|
||
|
canvas->drawPath(path, paint);
|
||
|
}
|
||
|
} // END FIDDLE
|