29 path.moveTo(0.0f, size);
30 path.cubicTo(c, size, size, c, size, 0.0f);
31 path.cubicTo(size, -c, c, -size, 0.0f, -size);
32 path.cubicTo(-c, -size, -size, -c, -size, 0.0f);
33 path.cubicTo(-size, c, -c, size, 0.0f, size);
43 for (
int i = 0; i < 2; i++) {
44 paint.setAntiAlias(i == 1);
45 for (
int j = 0; j < 4; j++) {
49 canvas->
translate(size / 2.0f, size / 2.0f);
55 canvas->
translate(size / 2.0f, 80.0f + size / 2.0f);
SkString getName() const override
SkISize getISize() override
static void draw_path(SkScalar size, SkCanvas *canvas, SkPaint paint)
void onDraw(SkCanvas *canvas) 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 drawPath(const SkPath &path, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
@ kStroke_Style
set to stroke geometry
GM(SkColor backgroundColor=SK_ColorWHITE)
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)