144 {
145 struct FillAndName {
148 };
149 constexpr FillAndName gFills[] = {
154 };
155 struct StyleAndName {
158 };
159 constexpr StyleAndName
gStyles[] = {
163 };
164 struct CapAndName {
168 };
169 constexpr CapAndName gCaps[] = {
173 };
174 struct PathAndName {
177 };
183 path.fName =
"moveTo-cubic";
184
189 const char title[] = "Cubic Drawn Into Rectangle Clips With "
190 "Indicated Style, Fill and Linecaps, with stroke width 10";
191 canvas->
drawString(title, 20, 20, font, titlePaint);
192
198 for (size_t cap = 0; cap < std::size(gCaps); ++cap) {
199 if (0 < cap) {
201 }
203 for (size_t fill = 0; fill < std::size(gFills); ++fill) {
204 if (0 < fill) {
206 }
208 for (
size_t style = 0; style < std::size(
gStyles); ++style) {
209 if (0 < style) {
211 }
212
214 this->drawPath(
path.fPath, canvas,
color, rect,
215 gCaps[cap].fCap, gCaps[cap].fJoin,
gStyles[style].fStyle,
217
224
231 }
233 }
235 }
238 }
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[]