34 MyDrawable(
const SkRect& r) : fR(r), fSweep(0) {}
37 if (fSweep != sweep) {
39 this->notifyDrawingChanged();
43 void onDraw(
SkCanvas* canvas)
override {
45 paint.setAntiAlias(
true);
49 paint.setColor(0x800000FF);
52 paint.setColor(0x800FF000);
59 paint.setStrokeWidth(0);
64 SkRect onGetBounds()
override {
71 SkRect fRect = {20, 20, 220, 220};
94 static void DrawArcs(
SkCanvas* canvas) {
101 paint.setAntiAlias(
true);
123 DrawRectWithLines(canvas, r,
paint);
128 DrawLabel(canvas, r, gAngles[
i], gAngles[
i+1]);
138 paint.setAntiAlias(
true);
153 fAnimatingDrawable = sk_make_sp<MyDrawable>(
fRect);
161 canvas->
clear(0xFFDDDDDD);
167 if (fAnimatingDrawable) {
168 fAnimatingDrawable->setSweep(angle);
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
#define SkDoubleToScalar(x)
bool animate(double nanos) override
void draw(SkCanvas *canvas) override
void load(SkScalar w, SkScalar h) override
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void drawDrawable(SkDrawable *drawable, const SkMatrix *matrix=nullptr)
void clear(SkColor color)
void drawArc(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkDrawable > finishRecordingAsDrawable()
void append(const char text[])
void appendScalar(SkScalar value)
const char * c_str() const
static void DrawString(SkCanvas *canvas, const char text[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint, Align align=kLeft_Align)
sk_sp< SkBlender > blender SkRect rect
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.
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
void outset(float dx, float dy)
void setWH(float width, float height)
SkScalar fRight
larger x-axis bounds
constexpr float centerX() const
constexpr float centerY() const
static constexpr SkRect MakeWH(float w, float h)
SkScalar fTop
smaller y-axis bounds