131 {
132
133 static constexpr SkScalar kIntervals[][2]{
134 {0.333f, 0.333f},
135 {0.015f, 0.015f},
136 {0.01f , 0.09f },
137 {0.097f, 0.003f},
138 {0.02f , 0.04f },
139 {0.1f , 0.2f },
140 {0.25f , 0.25f },
141 {0.6f , 0.7f },
142 {1.2f , 0.8f },
143 {0.1f , 1.1f },
144 };
145
146 static constexpr int kN =
std::size(kIntervals);
151
153 static constexpr SkRect kThinCircle = {-kThinRadius, -kThinRadius,
154 kThinRadius, kThinRadius};
155 static constexpr SkScalar kThinStrokeWidth = 0.4f;
156
159 for (
int i = 0;
i < kN; ++
i) {
162 SkScalar scaledIntervals[2] = {kCircumference * kIntervals[
i][0],
163 kCircumference * kIntervals[
i][1]};
165 scaledIntervals, 2, kCircumference *
fPhaseDegrees * kTau / 360.f);
166 static constexpr SkScalar kThinCircumference = kThinRadius * kTau;
167 scaledIntervals[0] = kThinCircumference * kIntervals[
i][0];
168 scaledIntervals[1] = kThinCircumference * kIntervals[
i][1];
170 scaledIntervals, 2, kThinCircumference *
fPhaseDegrees * kTau / 360.f);
171 }
172
183 SkMatrix::Concat(
SkMatrix::MakeAll(-1, 0, 0, 0, 1, 0, 0, 0, 1),
rotate),
185 };
186
188 paint.setAntiAlias(
true);
190 paint.setStroke(
true);
191
192
195 kThinStrokeWidth / 2.f);
196 for (
const auto&
m : kMatrices) {
198 m.mapRect(&devBounds, kBounds);
200 }
201
206 for (
const auto&
m : kMatrices) {
209
210 paint.setPathEffect(deffects[
i]);
213
214 paint.setPathEffect(thinDEffects[
i]);
215 paint.setStrokeWidth(kThinStrokeWidth);
217
220 }
223 }
225 }
static bool rotate(const SkDCubic &cubic, int zero, int index, SkDCubic &rotPath)
void drawOval(const SkRect &oval, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void concat(const SkMatrix &matrix)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix MakeAll(SkScalar scaleX, SkScalar skewX, SkScalar transX, SkScalar skewY, SkScalar scaleY, SkScalar transY, SkScalar pers0, SkScalar pers1, SkScalar pers2)
static SkMatrix Concat(const SkMatrix &a, const SkMatrix &b)
static const SkMatrix & I()
Optional< SkRect > bounds
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
static constexpr SkRect MakeEmpty()
SkRect makeOutset(float dx, float dy) const