59 {
66 .
quadTo(200, 200, 150, 200)
72 .
quadTo(150, 150, 125, 150)
76 if (fInvertDraw) {
78 } else {
80 }
84
85 SkPath clipA =
SkPath::Polygon({{10, 20}, {165, 22}, {70, 105}, {165, 177}, {-5, 180}},
true);
86
87 SkPath clipB =
SkPath::Polygon({{40, 10}, {190, 15}, {195, 190}, {40, 185}, {155, 100}},
true);
88
90
91 constexpr struct {
94 } gOps[] = {
97 };
98
101
102 if (fDoSaveLayer) {
103
104
105
107 4.0f/3.0f * -20,
108 4.0f/3.0f * -20,
109 4.0f/3.0f * (this->
getISize().fWidth - 20),
110 4.0f/3.0f * (this->
getISize().fHeight - 20));
111
119 }
120
121 for (int invBits = 0; invBits < 4; ++invBits) {
123 for (
size_t op = 0; op <
std::size(gOps); ++op) {
124 this->drawHairlines(canvas,
path, clipA, clipB);
125
126 bool doInvA =
SkToBool(invBits & 1);
127 bool doInvB =
SkToBool(invBits & 2);
129
135 canvas->
clipPath(clipB, gOps[op].fOp, fDoAAClip);
136
137
138
139 if (fInvertDraw) {
145 }
146
147
150
151
155 const char* aTxt = doInvA ? "InvA " : "A ";
163 const char* bTxt = doInvB ? "InvB " : "B ";
165
167 }
170 }
171
172 if (fDoSaveLayer) {
174 }
175 }
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
@ kUTF8
uses bytes to represent UTF-8 or ASCII
static constexpr bool SkToBool(const T &x)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void drawPath(const SkPath &path, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void setStyle(Style style)
void setColor(SkColor color)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
SkPathBuilder & lineTo(SkPoint pt)
SkPathBuilder & moveTo(SkPoint pt)
SkPathBuilder & quadTo(SkPoint pt1, SkPoint pt2)
void setFillType(SkPathFillType ft)
const SkRect & getBounds() const
static SkPath Polygon(const SkPoint pts[], int count, bool isClosed, SkPathFillType=SkPathFillType::kWinding, bool isVolatile=false)
SkISize getISize() override
Optional< SkRect > bounds
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.
constexpr SkColor gPathColor
constexpr SkColor gClipBColor
constexpr SkColor gClipAColor
void outset(float dx, float dy)
void join(const SkRect &r)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)