Options
These globals are now defined:
double duration; // The requested duration of the animation. double frame; // A value in [0, 1] of where we are in the animation.
This global is now defined:
GrBackendRenderTarget backEndRenderTarget;
GrBackendTexture backEndTextureRenderTarget;
Optional source image
These globals are now defined:
SkBitmap source; sk_sp<SkImage> image; GrBackendTexture backEndTexture; // GPU Only.
Note:
Adding comments with SK_FOLD_START and SK_FOLD_END creates foldable code
blocks.
These blocks will be folded by default and are useful for highlighting specific lines of code.
You can also use the keyboard shortcuts Ctrl+S and Ctrl+E in the code editor to set them.
These blocks will be folded by default and are useful for highlighting specific lines of code.
You can also use the keyboard shortcuts Ctrl+S and Ctrl+E in the code editor to set them.
xxxxxxxxxx
112
void draw(SkCanvas* canvas) {
SkPaint paint;
paint.setAntiAlias(true);
SkPath path, result;
path.setFillType(SkPathFillType::kWinding);
path.moveTo(SkBits2Float(0x43d88000), SkBits2Float(0xc1400000)); // 433, -12
path.quadTo(SkBits2Float(0x43c00000), SkBits2Float(0xc1400000), SkBits2Float(0x43ae8000), SkBits2Float(0x40c00000)); // 384, -12, 349, 6
path.quadTo(SkBits2Float(0x439d0000), SkBits2Float(0x41c00000), SkBits2Float(0x43930000), SkBits2Float(0x426c0000)); // 314, 24, 294, 59
path.quadTo(SkBits2Float(0x438c8000), SkBits2Float(0x42a20000), SkBits2Float(0x43898000), SkBits2Float(0x42da0000)); // 281, 81, 275, 109
path.quadTo(SkBits2Float(0x43868000), SkBits2Float(0x428c0000), SkBits2Float(0x43800000), SkBits2Float(0x42380000)); // 269, 70, 256, 46
path.quadTo(SkBits2Float(0x436e0000), SkBits2Float(0x41500000), SkBits2Float(0x43550000), SkBits2Float(0x3f000000)); // 238, 13, 213, 0.5f
path.quadTo(SkBits2Float(0x433c0000), SkBits2Float(0xc1400000), SkBits2Float(0x43220000), SkBits2Float(0xc1400000)); // 188, -12, 162, -12
path.quadTo(SkBits2Float(0x42d40000), SkBits2Float(0xc1400000), SkBits2Float(0x42930000), SkBits2Float(0x420c0000)); // 106, -12, 73.5f, 35
path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x42a40000), SkBits2Float(0x42240000), SkBits2Float(0x43420000)); // 41, 82, 41, 194
path.quadTo(SkBits2Float(0x42240000), SkBits2Float(0x43928000), SkBits2Float(0x42930000), SkBits2Float(0x43b38000)); // 41, 293, 73.5f, 359
path.quadTo(SkBits2Float(0x42d40000), SkBits2Float(0x43d48000), SkBits2Float(0x43240000), SkBits2Float(0x43e58000)); // 106, 425, 164, 459
path.quadTo(SkBits2Float(0x435e0000), SkBits2Float(0x43f68000), SkBits2Float(0x43958000), SkBits2Float(0x43f68000)); // 222, 493, 299, 493
path.quadTo(SkBits2Float(0x43ab0000), SkBits2Float(0x43f68000), SkBits2Float(0x43bd0000), SkBits2Float(0x43f2c000)); // 342, 493, 378, 485.5f
path.quadTo(SkBits2Float(0x43cf0000), SkBits2Float(0x43ef0000), SkBits2Float(0x43df8000), SkBits2Float(0x43e80000)); // 414, 478, 447, 464
path.quadTo(SkBits2Float(0x43f00000), SkBits2Float(0x43e10000), SkBits2Float(0x43ff8000), SkBits2Float(0x43d70000)); // 480, 450, 511, 430
path.lineTo(SkBits2Float(0x43f78000), SkBits2Float(0x43cc0000)); // 495, 408
path.quadTo(SkBits2Float(0x43e90000), SkBits2Float(0x43d58000), SkBits2Float(0x43d9c000), SkBits2Float(0x43dc4000)); // 466, 427, 435.5f, 440.5f
path.quadTo(SkBits2Float(0x43ca8000), SkBits2Float(0x43e30000), SkBits2Float(0x43b9c000), SkBits2Float(0x43e68000)); // 405, 454, 371.5f, 461
path.quadTo(SkBits2Float(0x43a90000), SkBits2Float(0x43ea0000), SkBits2Float(0x43958000), SkBits2Float(0x43ea0000)); // 338, 468, 299, 468
path.quadTo(SkBits2Float(0x43650000), SkBits2Float(0x43ea0000), SkBits2Float(0x43308000), SkBits2Float(0x43da4000)); // 229, 468, 176.5f, 436.5f
path.quadTo(SkBits2Float(0x42f80000), SkBits2Float(0x43ca8000), SkBits2Float(0x42c00000), SkBits2Float(0x43ac0000)); // 124, 405, 96, 344
path.quadTo(SkBits2Float(0x42880000), SkBits2Float(0x438d8000), SkBits2Float(0x42880000), SkBits2Float(0x43420000)); // 68, 283, 68, 194
path.quadTo(SkBits2Float(0x42880000), SkBits2Float(0x42c40000), SkBits2Float(0x42b70000), SkBits2Float(0x42600000)); // 68, 98, 91.5f, 56
path.quadTo(SkBits2Float(0x42e60000), SkBits2Float(0x41600000), SkBits2Float(0x43220000), SkBits2Float(0x41600000)); // 115, 14, 162, 14
path.quadTo(SkBits2Float(0x43510000), SkBits2Float(0x41600000), SkBits2Float(0x43680000), SkBits2Float(0x425a0000)); // 209, 14, 232, 54.5f
path.quadTo(SkBits2Float(0x437f0000), SkBits2Float(0x42be0000), SkBits2Float(0x43830000), SkBits2Float(0x43290000)); // 255, 95, 262, 169
path.lineTo(SkBits2Float(0x438f0000), SkBits2Float(0x43290000)); // 286, 169
path.quadTo(SkBits2Float(0x43930000), SkBits2Float(0x42cc0000), SkBits2Float(0x43a00000), SkBits2Float(0x42780000)); // 294, 102, 320, 62
path.quadTo(SkBits2Float(0x43ac8000), SkBits2Float(0x41c80000), SkBits2Float(0x43c68000), SkBits2Float(0x41800000)); // 345, 25, 397, 16
path.quadTo(SkBits2Float(0x43c00000), SkBits2Float(0x42140000), SkBits2Float(0x43bb8000), SkBits2Float(0x42700000)); // 384, 37, 375, 60
path.quadTo(SkBits2Float(0x43b60000), SkBits2Float(0x42b80000), SkBits2Float(0x43b60000), SkBits2Float(0x42fe0000)); // 364, 92, 364, 127
path.quadTo(SkBits2Float(0x43b60000), SkBits2Float(0x43310000), SkBits2Float(0x43c30000), SkBits2Float(0x43508000)); // 364, 177, 390, 208.5f
path.quadTo(SkBits2Float(0x43d00000), SkBits2Float(0x43700000), SkBits2Float(0x43e60000), SkBits2Float(0x43700000)); // 416, 240, 460, 240
path.quadTo(SkBits2Float(0x43f48000), SkBits2Float(0x43700000), SkBits2Float(0x43ff4000), SkBits2Float(0x43620000)); // 489, 240, 510.5f, 226
path.quadTo(SkBits2Float(0x44050000), SkBits2Float(0x43540000), SkBits2Float(0x4407e000), SkBits2Float(0x43390000)); // 532, 212, 543.5f, 185
path.quadTo(SkBits2Float(0x440ac000), SkBits2Float(0x431e0000), SkBits2Float(0x440ac000), SkBits2Float(0x42ee0000)); // 555, 158, 555, 119
path.quadTo(SkBits2Float(0x440ac000), SkBits2Float(0x42ae0000), SkBits2Float(0x4408a000), SkBits2Float(0x427a0000)); // 555, 87, 546.5f, 62.5f
path.quadTo(SkBits2Float(0x44068000), SkBits2Float(0x42180000), SkBits2Float(0x44026000), SkBits2Float(0x41ac0000)); // 538, 38, 521.5f, 21.5f
path.quadTo(SkBits2Float(0x43fc8000), SkBits2Float(0x40a00000), SkBits2Float(0x43f18000), SkBits2Float(0xc0600000)); // 505, 5, 483, -3.5f
path.quadTo(SkBits2Float(0x43e68000), SkBits2Float(0xc1400000), SkBits2Float(0x43d88000), SkBits2Float(0xc1400000)); // 461, -12, 433, -12
path.close();
path.moveTo(SkBits2Float(0x43d50000), SkBits2Float(0x41500000)); // 426, 13
path.quadTo(SkBits2Float(0x43d70000), SkBits2Float(0x41500000), SkBits2Float(0x43d90000), SkBits2Float(0x41500000)); // 430, 13, 434, 13
path.quadTo(SkBits2Float(0x43ef8000), SkBits2Float(0x41500000), SkBits2Float(0x43fbc000), SkBits2Float(0x42260000)); // 479, 13, 503.5f, 41.5f
path.quadTo(SkBits2Float(0x44040000), SkBits2Float(0x428c0000), SkBits2Float(0x44040000), SkBits2Float(0x42ee0000)); // 528, 70, 528, 119
path.quadTo(SkBits2Float(0x44040000), SkBits2Float(0x43280000), SkBits2Float(0x43fe8000), SkBits2Float(0x433f8000)); // 528, 168, 509, 191.5f
path.quadTo(SkBits2Float(0x43f50000), SkBits2Float(0x43570000), SkBits2Float(0x43e60000), SkBits2Float(0x43570000)); // 490, 215, 460, 215
path.quadTo(SkBits2Float(0x43d68000), SkBits2Float(0x43570000), SkBits2Float(0x43ccc000), SkBits2Float(0x43400000)); // 429, 215, 409.5f, 192
path.quadTo(SkBits2Float(0x43c30000), SkBits2Float(0x43290000), SkBits2Float(0x43c30000), SkBits2Float(0x42fa0000)); // 390, 169, 390, 125
path.quadTo(SkBits2Float(0x43c30000), SkBits2Float(0x42c00000), SkBits2Float(0x43c80000), SkBits2Float(0x42840000)); // 390, 96, 400, 66
path.quadTo(SkBits2Float(0x43cc8000), SkBits2Float(0x42180000), SkBits2Float(0x43d50000), SkBits2Float(0x41500000)); // 409, 38, 426, 13
path.close();
path.moveTo(SkBits2Float(0x44196cb3), SkBits2Float(0x43dd8000)); // 613.698f, 443
path.quadTo(SkBits2Float(0x4413ecb3), SkBits2Float(0x43dd8000), SkBits2Float(0x440f6cb3), SkBits2Float(0x43e10000)); // 591.698f, 443, 573.698f, 450
path.quadTo(SkBits2Float(0x440aecb3), SkBits2Float(0x43e48000), SkBits2Float(0x4407acb3), SkBits2Float(0x43eb0000)); // 555.698f, 457, 542.698f, 470
path.quadTo(SkBits2Float(0x44046cb3), SkBits2Float(0x43f18000), SkBits2Float(0x4402acb3), SkBits2Float(0x43fb4000)); // 529.698f, 483, 522.698f, 502.5f
path.quadTo(SkBits2Float(0x4400ecb3), SkBits2Float(0x44028000), SkBits2Float(0x4400ecb3), SkBits2Float(0x44088000)); // 515.698f, 522, 515.698f, 546
path.quadTo(SkBits2Float(0x4400ecb3), SkBits2Float(0x44110000), SkBits2Float(0x44042cb3), SkBits2Float(0x44184000)); // 515.698f, 580, 528.698f, 609
path.quadTo(SkBits2Float(0x44066cb3), SkBits2Float(0x441d4000), SkBits2Float(0x4409ecb3), SkBits2Float(0x44220000)); // 537.698f, 629, 551.698f, 648
path.lineTo(SkBits2Float(0x43c65966), SkBits2Float(0x44220000)); // 396.698f, 648
path.quadTo(SkBits2Float(0x43d15966), SkBits2Float(0x441f8000), SkBits2Float(0x43d79966), SkBits2Float(0x441aa000)); // 418.698f, 638, 431.198f, 618.5f
path.quadTo(SkBits2Float(0x43ddd966), SkBits2Float(0x4415c000), SkBits2Float(0x43ddd966), SkBits2Float(0x440e8000)); // 443.698f, 599, 443.698f, 570
path.quadTo(SkBits2Float(0x43ddd966), SkBits2Float(0x44094000), SkBits2Float(0x43da5966), SkBits2Float(0x4404c000)); // 443.698f, 549, 436.698f, 531
path.quadTo(SkBits2Float(0x43d6d966), SkBits2Float(0x44004000), SkBits2Float(0x43cfd966), SkBits2Float(0x43f98000)); // 429.698f, 513, 415.698f, 499
path.quadTo(SkBits2Float(0x43c75966), SkBits2Float(0x43f18000), SkBits2Float(0x43ba9966), SkBits2Float(0x43ee0000)); // 398.698f, 483, 373.198f, 476
path.quadTo(SkBits2Float(0x43add966), SkBits2Float(0x43ea8000), SkBits2Float(0x4396d966), SkBits2Float(0x43ea8000)); // 347.698f, 469, 301.698f, 469
path.lineTo(SkBits2Float(0x436cb2cc), SkBits2Float(0x43ea8000)); // 236.698f, 469
path.lineTo(SkBits2Float(0x436cb2cc), SkBits2Float(0x43f68000)); // 236.698f, 493
path.lineTo(SkBits2Float(0x43955966), SkBits2Float(0x43f68000)); // 298.698f, 493
path.quadTo(SkBits2Float(0x43a8d966), SkBits2Float(0x43f68000), SkBits2Float(0x43b3d966), SkBits2Float(0x43f90000)); // 337.698f, 493, 359.698f, 498
path.quadTo(SkBits2Float(0x43bed966), SkBits2Float(0x43fb8000), SkBits2Float(0x43c55966), SkBits2Float(0x4400c000)); // 381.698f, 503, 394.698f, 515
path.quadTo(SkBits2Float(0x43cb5966), SkBits2Float(0x44030000), SkBits2Float(0x43cdd966), SkBits2Float(0x4406a000)); // 406.698f, 524, 411.698f, 538.5f
path.quadTo(SkBits2Float(0x43d05966), SkBits2Float(0x440a4000), SkBits2Float(0x43d05966), SkBits2Float(0x440e8000)); // 416.698f, 553, 416.698f, 570
path.quadTo(SkBits2Float(0x43d05966), SkBits2Float(0x44130000), SkBits2Float(0x43cdd966), SkBits2Float(0x4416a000)); // 416.698f, 588, 411.698f, 602.5f
path.quadTo(SkBits2Float(0x43cb5966), SkBits2Float(0x441a4000), SkBits2Float(0x43c55966), SkBits2Float(0x441c8000)); // 406.698f, 617, 394.698f, 626
path.quadTo(SkBits2Float(0x43bed966), SkBits2Float(0x441f4000), SkBits2Float(0x43b41966), SkBits2Float(0x4420a000)); // 381.698f, 637, 360.198f, 642.5f
path.quadTo(SkBits2Float(0x43a95966), SkBits2Float(0x44220000), SkBits2Float(0x43955966), SkBits2Float(0x44220000)); // 338.698f, 648, 298.698f, 648
path.lineTo(SkBits2Float(0x4308b2cc), SkBits2Float(0x44220000)); // 136.698f, 648
path.lineTo(SkBits2Float(0x4308b2cc), SkBits2Float(0x44284000)); // 136.698f, 673
path.lineTo(SkBits2Float(0x440aecb3), SkBits2Float(0x44284000)); // 555.698f, 673
path.quadTo(SkBits2Float(0x44122cb3), SkBits2Float(0x44284000), SkBits2Float(0x44178cb3), SkBits2Float(0x44274000)); // 584.698f, 673, 606.198f, 669
path.quadTo(SkBits2Float(0x441cecb3), SkBits2Float(0x44264000), SkBits2Float(0x4420acb3), SkBits2Float(0x44246000)); // 627.698f, 665, 642.698f, 657.5f
path.quadTo(SkBits2Float(0x44246cb3), SkBits2Float(0x44228000), SkBits2Float(0x44276cb3), SkBits2Float(0x44200000)); // 657.698f, 650, 669.698f, 640
path.quadTo(SkBits2Float(0x442c2cb3), SkBits2Float(0x441c0000), SkBits2Float(0x442e8cb3), SkBits2Float(0x44160000)); // 688.698f, 624, 698.198f, 600
path.quadTo(SkBits2Float(0x4430ecb3), SkBits2Float(0x44100000), SkBits2Float(0x4430ecb3), SkBits2Float(0x4408c000)); // 707.698f, 576, 707.698f, 547
path.quadTo(SkBits2Float(0x4430ecb3), SkBits2Float(0x43f70000), SkBits2Float(0x442a4cb3), SkBits2Float(0x43ea4000)); // 707.698f, 494, 681.198f, 468.5f
path.quadTo(SkBits2Float(0x4423acb3), SkBits2Float(0x43dd8000), SkBits2Float(0x44196cb3), SkBits2Float(0x43dd8000)); // 654.698f, 443, 613.698f, 443
path.close();
path.moveTo(SkBits2Float(0x44112cb3), SkBits2Float(0x4421c000)); // 580.698f, 647
path.quadTo(SkBits2Float(0x440cecb3), SkBits2Float(0x441c4000), SkBits2Float(0x440a6cb3), SkBits2Float(0x4416c000)); // 563.698f, 625, 553.698f, 603
path.quadTo(SkBits2Float(0x44076cb3), SkBits2Float(0x44104000), SkBits2Float(0x44076cb3), SkBits2Float(0x4408c000)); // 541.698f, 577, 541.698f, 547
path.quadTo(SkBits2Float(0x44076cb3), SkBits2Float(0x43fc0000), SkBits2Float(0x440cecb3), SkBits2Float(0x43f30000)); // 541.698f, 504, 563.698f, 486
path.quadTo(SkBits2Float(0x44126cb3), SkBits2Float(0x43ea0000), SkBits2Float(0x44196cb3), SkBits2Float(0x43ea0000)); // 585.698f, 468, 613.698f, 468
path.quadTo(SkBits2Float(0x44216cb3), SkBits2Float(0x43ea0000), SkBits2Float(0x4425ecb3), SkBits2Float(0x43f3c000)); // 645.698f, 468, 663.698f, 487.5f
path.quadTo(SkBits2Float(0x442a6cb3), SkBits2Float(0x43fd8000), SkBits2Float(0x442a6cb3), SkBits2Float(0x4408c000)); // 681.698f, 507, 681.698f, 547
path.quadTo(SkBits2Float(0x442a6cb3), SkBits2Float(0x4414c000), SkBits2Float(0x44232cb3), SkBits2Float(0x441b8000)); // 681.698f, 595, 652.698f, 622
path.quadTo(SkBits2Float(0x441cecb3), SkBits2Float(0x44210000), SkBits2Float(0x44112cb3), SkBits2Float(0x4421c000)); // 627.698f, 644, 580.698f, 647
path.close();
bool ok = Simplify(path, &result);
SkASSERT(ok);
canvas->drawPath(result, paint);
}