391 {
392 struct FillAndName {
395 };
396 constexpr FillAndName gFills[] = {
401 };
402 struct StyleAndName {
405 };
406 constexpr StyleAndName
gStyles[] = {
410 };
411 struct CapAndName {
415 };
416 constexpr CapAndName gCaps[] = {
420 };
421 struct PathAndName {
424 };
430 path.fName =
"moveTo-cubic";
431
436 const char title[] = "Cubic Drawn Into Rectangle Clips With "
437 "Indicated Style, Fill and Linecaps, with stroke width 10";
438 canvas->
drawString(title, 20, 20, font, titlePaint);
439
445 for (size_t cap = 0; cap < std::size(gCaps); ++cap) {
446 if (0 < cap) {
448 }
450 for (size_t fill = 0; fill < std::size(gFills); ++fill) {
451 if (0 < fill) {
453 }
455 for (
size_t style = 0; style < std::size(
gStyles); ++style) {
456 if (0 < style) {
458 }
459
461 this->drawPath(
path.fPath, canvas, rect,
462 gCaps[cap].fCap, gCaps[cap].fJoin,
gStyles[style].fStyle,
464
471
478 }
480 }
482 }
485 }
SkStrokeRec::Style fStyle
constexpr SkColor SK_ColorBLACK
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
@ 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)
sk_sp< SkBlender > blender SkRect rect
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
font
Font Metadata and Metrics.
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkFontStyle gStyles[]