40 paint.setAntiAlias(
true);
41 paint.setStroke(
true);
42 paint.setStrokeWidth(15);
49 while (r.
width() >
paint.getStrokeWidth() * 3) {
81 canvas->translate(
R + 20,
R + 20);
84 paint.setAntiAlias(
true);
85 paint.setStroke(
true);
94 for (
SkScalar deg = 0; deg < 360; deg += 10) {
99 canvas->drawLine(0, 0, rx, ry,
paint);
105 canvas->drawLine({0, 0},
pos, measPaint);
125 canvas->
scale(20, 20);
129 paint.setAntiAlias(
true);
130 paint.setStroke(
true);
138 while (r.
width() >
paint.getStrokeWidth() * 2) {
175 canvas->
scale(20, 20);
179 paint.setAntiAlias(
true);
180 paint.setStroke(
true);
189 paint.setStroke(
false);
229 paint.setAntiAlias(
true);
230 paint.setStroke(
true);
232 canvas->translate(10, 10);
236 -123.7f, -2.3f, -2, -1, -0.3f, -0.000001f, 0, 0.000001f, 0.3f, 0.7f,
237 1, 1.3f, 1.5f, 1.7f, 1.99999f, 2, 2.00001f, 2.3f, 4.3f, 3934723942837.3f
240 sweepAngles[
i] *= 180;
243 SkScalar startAngles[] = { -1, -0.5f, 0, 0.5f };
245 startAngles[
i] *= 180;
248 bool anticlockwise =
false;
250 for (
size_t i = 0;
i <
std::size(startAngles) * 2; ++
i) {
252 anticlockwise =
true;
257 for (
size_t j = 0; j <
std::size(sweepAngles); ++j) {
261 anticlockwise,
true);
263 canvas->drawPath(
path.detach().setIsVolatile(
true),
paint);
264 canvas->translate(30, 0);
267 canvas->translate(0, 40);
274 paint.setAntiAlias(
true);
275 paint.setStroke(
true);
277 canvas->translate(50, 50);
280 SkScalar innerRadius = outerRadius - 20.0f;
289 path.moveTo(centerX + innerRadius * std::cos(startAngles[
i]),
290 centerY + innerRadius * std::sin(startAngles[
i]));
291 path.lineTo(centerX + outerRadius * std::cos(startAngles[
i]),
292 centerY + outerRadius * std::sin(startAngles[
i]));
297 path.lineTo(centerX + innerRadius * std::cos(endAngle),
298 centerY + innerRadius * std::sin(endAngle));
303 canvas->translate(20, 0);
static const int strokeWidth
constexpr SkColor SK_ColorRED
static int sign(SkScalar x)
#define INHERITED(method,...)
#define SkDegreesToRadians(degrees)
#define SkScalarSin(radians)
#define SkScalarCos(radians)
DEF_SIMPLE_GM(addarc_meas, canvas, 2 *R+40, 2 *R+40)
static void html_canvas_arc(SkPathBuilder *path, SkScalar x, SkScalar y, SkScalar r, SkScalar start, SkScalar end, bool ccw, bool callArcTo)
SkString getName() const override
bool onAnimate(double nanos) override
void onDraw(SkCanvas *canvas) override
SkISize getISize() override
bool onAnimate(double nanos) override
void onDraw(SkCanvas *canvas) override
SkString getName() const override
SkISize getISize() override
void drawOval(const SkRect &oval, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void rotate(SkScalar degrees)
void drawPath(const SkPath &path, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void setColor(SkColor color)
void setAntiAlias(bool aa)
bool getPosTan(SkScalar distance, SkPoint *position, SkVector *tangent)
SkString getName() const override
void onDraw(SkCanvas *canvas) override
bool onAnimate(double nanos) override
SkISize getISize() override
Optional< SkRect > bounds
static float Scaled(float time, float speed, float period=0)
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
static SkRect inset(const SkRect &r)
static constexpr SkISize Make(int32_t w, int32_t h)
void inset(float dx, float dy)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)