39 {
40 struct FillAndName {
43 };
44 constexpr FillAndName gFills[] = {
49 };
50 struct StyleAndName {
53 };
54 constexpr StyleAndName
gStyles[] = {
58 };
59 struct CapAndName {
63 };
64 constexpr CapAndName gCaps[] = {
68 };
69 struct PathAndName {
72 };
76 if (doClose) {
78 path.fName =
"moveTo-line-close";
79 } else {
80 path.fName =
"moveTo-line";
81 }
82
86
88
89 const char titleNoClose[] = "Line Drawn Into Rectangle Clips With "
90 "Indicated Style, Fill and Linecaps, with stroke width 10";
91 const char titleClose[] = "Line Closed Drawn Into Rectangle Clips With "
92 "Indicated Style, Fill and Linecaps, with stroke width 10";
93 const char* title = doClose ? titleClose : titleNoClose;
94 canvas->
drawString(title, 20.0f, 20.0f, font, titlePaint);
95
101 for (size_t cap = 0; cap < std::size(gCaps); ++cap) {
102 if (0 < cap) {
104 }
106 for (size_t fill = 0; fill < std::size(gFills); ++fill) {
107 if (0 < fill) {
109 }
111 for (
size_t style = 0; style < std::size(
gStyles); ++style) {
112 if (0 < style) {
114 }
115
118 gCaps[cap].fCap, gCaps[cap].fJoin,
gStyles[style].fStyle,
120
127
132 font, labelPaint);
134 font, labelPaint);
136 font, labelPaint);
137 }
139 }
141 }
144}
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)
static void drawPath(SkPath &path, SkCanvas *canvas, SkColor color, const SkRect &clip, SkPaint::Cap cap, SkPaint::Join join, SkPaint::Style style, SkPathFillType fill, SkScalar strokeWidth)
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[]