35 paint.setAntiAlias(
true);
36 paint.setStroke(
true);
38 paint.setStrokeWidth(42);
42 paint.setStrokeWidth(21);
47 paint.setPathEffect(
nullptr);
48 paint.setStrokeWidth(0);
54 const char*
d =
"M 337,98 C 250,141 250,212 250,212 C 250,212 250,212 250,212"
55 "C 250,212 250,212 250,212 C 250,212 250,141 163,98 C 156,195 217,231 217,231"
56 "C 217,231 217,231 217,231 C 217,231 217,231 217,231 C 217,231 156,195 75,250"
57 "C 156,305 217,269 217,269 C 217,269 217,269 217,269 C 217,269 217,269 217,269"
58 "C 217,269 156,305 163,402 C 250,359 250,288 250,288 C 250,288 250,288 250,288"
59 "C 250,288 250,288 250,288 C 250,288 250,359 338,402 C 345,305 283,269 283,269"
60 "C 283,269 283,269 283,269 C 283,269 283,269 283,269 C 283,269 345,305 425,250"
61 "C 344,195 283,231 283,231 C 283,231 283,231 283,231 C 283,231 283,231 283,231"
62 "C 283,231 344,195 338,98";
65 canvas->translate(-35.f, -55.f);
66 for (
int x = 0;
x < 2; ++
x) {
67 for (
int y = 0;
y < 2; ++
y) {
69 canvas->translate(
x * 430.f,
y * 355.f);
70 SkScalar intervals[] = { 5 + (
x ? 0 : 0.0001f + 0.0001f), 10 };
83 "M 0,100 C 10, 50 190, 50 200,100"
84 "M 200,100 C 210,150 390,150 400,100"
85 "M 400,100 C 390, 50 210, 50 200,100"
86 "M 200,100 C 190,150 10,150 0,100",
93 "M 200,125 L 400,125",
100 "M 250, 50 L 350,150"
101 "M 350,150 L 400,100",
113 static constexpr SkScalar kOffsets[][2] = {
127 SkPaint normalPaint = hairlinePaint;
130 SkPaint invertedPaint = normalPaint;
133 for (
const auto&
offset : kOffsets) {
135 stop =
offset[1] + fOffset;
145 swap(normalMode, invertedMode);
154 for (
const auto&
path : fPaths) {
168 fOffset -= floorf(fOffset);
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
void swap(sk_sp< T > &a, sk_sp< T > &b)
#define SkScalarFloorToScalar(x)
void translate(SkScalar dx, SkScalar dy)
void drawPath(const SkPath &path, const SkPaint &paint)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
void setColor(SkColor color)
void setAntiAlias(bool aa)
void setStrokeCap(Cap cap)
void setPathEffect(sk_sp< SkPathEffect > pathEffect)
@ kDefault_Join
equivalent to kMiter_Join
void setStrokeWidth(SkScalar width)
static bool FromSVGString(const char str[], SkPath *)
static sk_sp< SkPathEffect > Make(SkScalar startT, SkScalar stopT, Mode=Mode::kNormal)
bool onAnimate(double nanos) override
SkString getName() const override
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
void onOnceBeforeDraw() override
static void flower(SkCanvas *canvas, const SkPath &path, SkScalar intervals[2], SkPaint::Join join)
DEF_SIMPLE_GM(dashcubics, canvas, 865, 750)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
static SkMSec NanosToMSec(double nanos)
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
static SkString join(const CommandLineFlags::StringArray &)
static constexpr SkISize Make(int32_t w, int32_t h)