36 SkISize getISize()
override {
return {896, 930}; }
45 path.moveTo(moveToPt);
51 path.moveTo(moveToPt);
63 path.moveTo(moveToPt);
64 path.lineTo(moveToPt);
70 path.moveTo(moveToPt);
71 path.lineTo(moveToPt);
77 path.quadTo(startPt, startPt);
83 path.moveTo(moveToPt);
84 path.quadTo(moveToPt, moveToPt);
90 path.moveTo(moveToPt);
91 path.quadTo(moveToPt, moveToPt);
97 path.cubicTo(startPt, startPt, startPt);
103 path.moveTo(moveToPt);
104 path.cubicTo(moveToPt, moveToPt, moveToPt);
110 path.moveTo(moveToPt);
111 path.cubicTo(moveToPt, moveToPt, moveToPt);
130 path.moveTo(moveToPt);
138 path.moveTo(moveToPt);
147 path.quadTo(midPt, endPt);
155 path.moveTo(moveToPt);
156 path.quadTo(midPt, endPt);
164 path.moveTo(moveToPt);
165 path.quadTo(midPt, endPt);
174 path.cubicTo(t1Pt, t2Pt, endPt);
183 path.moveTo(moveToPt);
184 path.cubicTo(t1Pt, t2Pt, endPt);
193 path.moveTo(moveToPt);
194 path.cubicTo(t1Pt, t2Pt, endPt);
203 path.setFillType(fill);
205 paint.setStrokeCap(cap);
209 paint.setStyle(style);
216 void onDraw(
SkCanvas* canvas)
override {
217 constexpr AddSegmentFunc gSegmentFunctions[] = {
222 AddMoveDegenLineClose,
225 AddMoveDegenQuadClose,
228 AddMoveDegenCubicClose,
240 const char* gSegmentNames[] = {
245 "MoveDegenLineClose",
248 "MoveDegenQuadClose",
251 "MoveDegenCubicClose",
268 constexpr FillAndName gFills[] = {
274 struct StyleAndName {
278 constexpr StyleAndName
gStyles[] = {
288 constexpr CapAndName gCaps[] = {
298 const char title[] =
"Random Paths Drawn Into Rectangle Clips With "
299 "Indicated Style, Fill and Linecaps, "
300 "with Stroke width 6";
308 unsigned numSegments =
std::size(gSegmentFunctions);
312 for (
size_t row = 0; row < 6; ++row) {
317 for (
size_t column = 0; column < 4; ++column) {
323 StyleAndName style =
gStyles[(rand.
nextU() >> 16) % numStyles];
324 CapAndName cap = gCaps[(rand.
nextU() >> 16) % numCaps];
325 FillAndName fill = gFills[(rand.
nextU() >> 16) % numFills];
326 unsigned s1 = (rand.
nextU() >> 16) % numSegments;
327 unsigned s2 = (rand.
nextU() >> 16) % numSegments;
328 unsigned s3 = (rand.
nextU() >> 16) % numSegments;
329 unsigned s4 = (rand.
nextU() >> 16) % numSegments;
330 unsigned s5 = (rand.
nextU() >> 16) % numSegments;
333 pt = gSegmentFunctions[s1](
path, pt);
334 pt = gSegmentFunctions[s2](
path, pt);
335 pt = gSegmentFunctions[s3](
path, pt);
336 pt = gSegmentFunctions[s4](
path, pt);
337 pt = gSegmentFunctions[s5](
path, pt);
340 cap.fCap, cap.fJoin, style.fStyle,
SkStrokeRec::Style fStyle
static const int strokeWidth
constexpr SkColor SK_ColorBLACK
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawPath(const SkPath &path, const SkPaint &paint)
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
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
font
Font Metadata and Metrics.
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static SkString join(const CommandLineFlags::StringArray &)
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkFontStyle gStyles[]