42 constexpr int gCoord[] = {
83 for (
int i = 0;
i < teeth;
i++) {
145 for (
int i = 1;
i < n;
i++) {
151 return {
builder.detach(), r * 2 * 6 / 5};
175 path.cubicTo(12.94999980926514f, 4,
176 4, 12.94999980926514f,
178 path.cubicTo(4, 35.04999923706055f,
179 12.94999980926514f, 44,
181 path.cubicTo(35.04999923706055f, 44,
182 44, 35.04999923706055f,
184 path.cubicTo(44, 12.95000076293945f,
185 35.04999923706055f, 4,
200 return path.detach();
206 path.cubicTo(13.10000038146973f, 2,
207 14, 2.900000095367432f,
209 path.cubicTo(14, 5.099999904632568f,
210 13.10000038146973f, 6,
212 path.cubicTo(10.89999961853027f, 6,
213 10, 5.099999904632568f,
215 path.cubicTo(10, 2.900000095367432f,
216 10.89999961853027f, 2,
233 return path.detach();
239 path.moveTo(1.9520f, 2.0000f);
240 path.conicTo(1.5573f, 1.9992f, 1.2782f, 2.2782f, 0.9235f);
241 path.conicTo(0.9992f, 2.5573f, 1.0000f, 2.9520f, 0.9235f);
242 path.lineTo(1.0000f, 5.4300f);
243 path.lineTo(17.0000f, 5.4300f);
244 path.lineTo(17.0000f, 2.9520f);
245 path.conicTo(17.0008f, 2.5573f, 16.7218f, 2.2782f, 0.9235f);
246 path.conicTo(16.4427f, 1.9992f, 16.0480f, 2.0000f, 0.9235f);
247 path.lineTo(1.9520f, 2.0000f);
249 path.moveTo(2.7140f, 3.1430f);
250 path.conicTo(3.0547f, 3.1287f, 3.2292f, 3.4216f, 0.8590f);
251 path.conicTo(3.4038f, 3.7145f, 3.2292f, 4.0074f, 0.8590f);
252 path.conicTo(3.0547f, 4.3003f, 2.7140f, 4.2860f, 0.8590f);
253 path.conicTo(2.1659f, 4.2631f, 2.1659f, 3.7145f, 0.7217f);
254 path.conicTo(2.1659f, 3.1659f, 2.7140f, 3.1430f, 0.7217f);
255 path.lineTo(2.7140f, 3.1430f);
257 path.moveTo(5.0000f, 3.1430f);
258 path.conicTo(5.3407f, 3.1287f, 5.5152f, 3.4216f, 0.8590f);
259 path.conicTo(5.6898f, 3.7145f, 5.5152f, 4.0074f, 0.8590f);
260 path.conicTo(5.3407f, 4.3003f, 5.0000f, 4.2860f, 0.8590f);
261 path.conicTo(4.4519f, 4.2631f, 4.4519f, 3.7145f, 0.7217f);
262 path.conicTo(4.4519f, 3.1659f, 5.0000f, 3.1430f, 0.7217f);
263 path.lineTo(5.0000f, 3.1430f);
265 path.moveTo(7.2860f, 3.1430f);
266 path.conicTo(7.6267f, 3.1287f, 7.8012f, 3.4216f, 0.8590f);
267 path.conicTo(7.9758f, 3.7145f, 7.8012f, 4.0074f, 0.8590f);
268 path.conicTo(7.6267f, 4.3003f, 7.2860f, 4.2860f, 0.8590f);
269 path.conicTo(6.7379f, 4.2631f, 6.7379f, 3.7145f, 0.7217f);
270 path.conicTo(6.7379f, 3.1659f, 7.2860f, 3.1430f, 0.7217f);
272 path.moveTo(1.0000f, 6.1900f);
273 path.lineTo(1.0000f, 14.3810f);
274 path.conicTo(0.9992f, 14.7757f, 1.2782f, 15.0548f, 0.9235f);
275 path.conicTo(1.5573f, 15.3338f, 1.9520f, 15.3330f, 0.9235f);
276 path.lineTo(16.0480f, 15.3330f);
277 path.conicTo(16.4427f, 15.3338f, 16.7218f, 15.0548f, 0.9235f);
278 path.conicTo(17.0008f, 14.7757f, 17.0000f, 14.3810f, 0.9235f);
279 path.lineTo(17.0000f, 6.1910f);
280 path.lineTo(1.0000f, 6.1910f);
281 path.lineTo(1.0000f, 6.1900f);
283 return path.detach();
299#define N std::size(gProcs)
305 SkPath fAccessibilityPath;
309 for (
size_t i = 0;
i <
N;
i++) {
326 paint.setAntiAlias(
true);
328 for (
size_t i = 0;
i <
N;
i++) {
334 canvas->
scale(0.300000011920929f, 0.300000011920929f);
343 canvas->
scale(0.5f, 0.5f);
358 for (
size_t i = 0;
i <
N;
i++) {
387 SkRect clipR = {0, 0, 100, 200};
391 for (
int doclip = 0; doclip <= 1; ++doclip) {
392 for (
int aa = 0; aa <= 1; ++aa) {
399 const SkRect* clipPtr = doclip ? &clipR :
nullptr;
416 p.setAntiAlias(
true);
419 canvas->translate(50, 50);
422 path.cubicTo(48,-29.5, 6,-30, 6,-30);
423 path.cubicTo(6,-30, 2,0, 2,0);
424 path.cubicTo(2,0, 44,-21.5, 48,-23);
428 canvas->drawPath(
path,
p);
433 canvas->drawPath(
path,
p);
447 path.lineTo(150, 75);
448 path.lineTo(150, 150);
449 path.lineTo(75, 150);
450 canvas->drawPath(
path,
p);
452 canvas->translate(200, 0);
455 path.moveTo(100, 75);
456 path.lineTo(150, 75);
457 path.lineTo(150, 150);
458 path.lineTo(75, 150);
461 canvas->drawPath(
path,
p);
463 canvas->translate(200, 0);
467 path.lineTo(150, 75);
468 path.lineTo(150, 150);
469 path.lineTo(75, 150);
471 canvas->drawPath(
path,
p);
473 canvas->translate(-200 * 2, 200);
475 path.moveTo(75, 150);
477 path.lineTo(150, 75);
478 path.lineTo(150, 150);
479 path.lineTo(75, 150);
480 path.moveTo(75, 150);
481 canvas->drawPath(
path,
p);
483 canvas->translate(200, 0);
485 path.moveTo(250, 75);
486 path.moveTo(250, 75);
487 path.moveTo(250, 75);
488 path.moveTo(100, 75);
489 path.lineTo(150, 75);
490 path.lineTo(150, 150);
491 path.lineTo(75, 150);
496 canvas->drawPath(
path,
p);
498 canvas->translate(200, 0);
501 path.lineTo(150, 75);
502 path.lineTo(150, 150);
503 path.lineTo(75, 150);
504 path.moveTo(250, 75);
505 canvas->drawPath(
path,
p);
507 canvas->translate(-200 * 2, 200);
511 path.lineTo(150, 75);
512 path.lineTo(150, 150);
513 path.lineTo(75, 150);
516 canvas->drawPath(
path,
p);
518 canvas->translate(200, 0);
524 path.lineTo(150, 75);
525 path.lineTo(150, 150);
526 path.lineTo(75, 150);
531 canvas->drawPath(
path,
p);
533 canvas->translate(200, 0);
539 path.lineTo(150, 75);
540 path.lineTo(150, 150);
541 path.lineTo(75, 150);
543 canvas->drawPath(
path,
p);
545 canvas->translate(-200 * 2, 200);
548 path.lineTo(150, 75);
549 path.lineTo(150, 150);
550 path.lineTo(75, 150);
551 path.lineTo(75, 250);
554 canvas->drawPath(
path,
p);
556 canvas->translate(200, 0);
559 path.lineTo(150, 75);
560 path.lineTo(150, 150);
561 path.lineTo(75, 150);
565 canvas->drawPath(
path,
p);
567 canvas->translate(200, 0);
570 path.lineTo(150, 75);
571 path.lineTo(150, 150);
572 path.lineTo(10, 150);
575 canvas->drawPath(
path,
p);
577 canvas->translate(200, -200 * 3);
579 path.moveTo(150, 75);
580 path.lineTo(150, 150);
581 path.lineTo(75, 150);
582 path.lineTo(75, 100);
583 canvas->drawPath(
path,
p);
585 canvas->translate(0, 200);
587 path.moveTo(150, 100);
588 path.lineTo(150, 100);
589 path.lineTo(150, 150);
590 path.lineTo(75, 150);
591 path.lineTo(75, 100);
593 path.lineTo(150, 75);
595 canvas->drawPath(
path,
p);
597 canvas->translate(0, 200);
600 path.lineTo(150, 75);
601 path.lineTo(150, 150);
602 path.lineTo(140, 150);
603 path.lineTo(140, 75);
606 canvas->drawPath(
path,
p);
608 canvas->translate(0, 200);
611 path.lineTo(150, 75);
612 path.lineTo(150, 150);
613 path.lineTo(140, 150);
614 path.lineTo(140, 75);
617 canvas->drawPath(
path,
p);
625 canvas = surf->getCanvas();
629 p.setAntiAlias(
true);
633 canvas->scale(4.16666651f/2, 4.16666651f/2);
641 {-4.80825292E-7f, 23},
645 {-10.999999f, 5.92486763f},
649 {10.9999981f, 5.92486572f},
652 path.moveTo(pts[0]).cubicTo(pts[1], pts[2], pts[3])
653 .cubicTo(pts[4], pts[5], pts[6])
654 .cubicTo(pts[7], pts[8], pts[9])
655 .cubicTo(pts[10],pts[11],pts[12]);
657 canvas->drawPath(
path,
p);
659 surf->draw(orig, 0, 0);
665 p.setAntiAlias(
true);
670 SkPoint pts[] = { {20, 20}, {100, 20}, {100, 60}, {130, 150}, {180, 160} };
676 path.arcTo(pts[3], pts[4], radius);
677 canvas->drawPath(
path.detach(),
p);
683 paint.setAntiAlias(
true);
686 path.moveTo(258, -2);
687 path.lineTo(258, 258);
688 path.lineTo(237, 258);
689 path.lineTo(240, -2);
690 path.lineTo(258, -2);
692 path.lineTo(240, -2);
693 path.lineTo(238, 131);
694 path.lineTo(-2, 131);
707 paint.setAntiAlias(
true);
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
#define SkScalarSin(radians)
#define SkScalarCos(radians)
static constexpr bool SkToBool(const T &x)
SkString getName() const override
void onDraw(SkCanvas *canvas) override
void onOnceBeforeDraw() override
SkISize getISize() override
SkISize getISize() override
void onOnceBeforeDraw() override
static void show(SkCanvas *canvas, const SkPath &path, const SkPaint &paint, const SkRect *clip, SkScalar top, const SkScalar bottom)
void onDraw(SkCanvas *canvas) override
SkString getName() const override
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawPath(const SkPath &path, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
SkPathBuilder & toggleInverseFillType()
SkPathBuilder & lineTo(SkPoint pt)
SkPathBuilder & addRect(const SkRect &, SkPathDirection, unsigned startIndex)
SkPathBuilder & addCircle(SkScalar center_x, SkScalar center_y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)
SkPathBuilder & moveTo(SkPoint pt)
SkPathBuilder & addOval(const SkRect &, SkPathDirection, unsigned startIndex)
SkPathBuilder & offset(SkScalar dx, SkScalar dy)
static SkPath RRect(const SkRRect &, SkPathDirection dir=SkPathDirection::kCW)
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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
SK_API bool FillPathWithPaint(const SkPath &src, const SkPaint &paint, SkPath *dst, const SkRect *cullRect, SkScalar resScale=1)
constexpr MakePathProc gProcs[]
static PathDY make_sawtooth_3()
static PathDY make_frame()
static PathDY make_star_13()
static SkPath make_info()
DEF_SIMPLE_GM(rotatedcubicpath, canvas, 200, 200)
static PathDY make_house()
static SkPath make_accessibility()
static PathDY make_star_5()
static SkPath make_visualizer()
static PathDY make_line()
static PathDY make_triangle()
static PathDY make_sawtooth(int teeth)
static PathDY make_star(int n)
static PathDY make_rect()
static PathDY make_sawtooth_32()
static PathDY make_oval()
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
SkScalar fBottom
larger y-axis bounds
constexpr float centerY() const
SkScalar fTop
smaller y-axis bounds