34 { -0.5f, -0.5f, 1, 1, 0, 0 },
35 { 0.5f, 0.5f, 1, 1, 0, 0 },
37 { 0, 0, 1.5f, 1.5f, 0, 0 },
38 { -0.5f, -0.5f, 1.5f, 1.5f, 0, 0 },
39 { 0.5f, 0.5f, 1.5f, 1.5f, 0, 0 },
41 { 0, 0, 0.5f, 0.5f, 0, 0 },
42 { 0.25f, 0.25f, 0.5f, 0.5f, 0, 0 },
43 { -0.25f, -0.25f, 0.5f, 0.5f, 0, 0 },
45 { 0, 0, 1, 1, 0.5f, 0.5f },
46 { -0.5f, -0.5f, 1, 1, 0.5f, 0.5f },
47 { 0.5f, 0.5f, 1, 1, 0.5f, 0.5f },
49 { 0, 0, 1.5f, 1.5f, 0.5f, 0.5f },
50 { -0.5f, -0.5f, 1.5f, 1.5f, 0.5f, 0.5f },
51 { 0.5f, 0.5f, 1.5f, 1.5f, 0.5f, 0.5f },
53 { 0, 0, 1.5f, 1, 0, 0 },
54 { -0.5f, -0.5f, 1.5f, 1, 0, 0 },
55 { 0.5f, 0.5f, 1.5f, 1, 0, 0 },
57 { 0, 0, 0.5f, 1, 0, 0 },
58 { 0.25f, 0.25f, 0.5f, 1, 0, 0 },
59 { -0.25f, -0.25f, 0.5f, 1, 0, 0 },
61 { 0, 0, 1, 1.5f, 0, 0 },
62 { -0.5f, -0.5f, 1, 1.5f, 0, 0 },
63 { 0.5f, 0.5f, 1, 1.5f, 0, 0 },
65 { 0, 0, 1, 0.5f, 0, 0 },
66 { 0.25f, 0.25f, 1, 0.5f, 0, 0 },
67 { -0.25f, -0.25f, 1, 0.5f, 0, 0 },
75 paint.setAntiAlias(
true);
78 canvas->
drawCircle(pictureSize / 4, pictureSize / 4, pictureSize / 4,
paint);
81 pictureSize / 2, pictureSize / 2),
paint);
84 canvas->
drawLine(pictureSize / 2, pictureSize * 1 / 3,
85 pictureSize / 2, pictureSize * 2 / 3,
paint);
86 canvas->
drawLine(pictureSize * 1 / 3, pictureSize / 2,
87 pictureSize * 2 / 3, pictureSize / 2,
paint);
113 for (
unsigned i = 0; i < std::size(
tiles); ++i) {
129 pictureRef = offsetPicture;
144 for (
unsigned i = 0; i < std::size(fShaders); ++i) {
145 paint.setShader(fShaders[i]);
158 using INHERITED =
GM;
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
SkString getName() const override
SkISize getISize() override
void onOnceBeforeDraw() override
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 clear(SkColor color)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
SkMatrix & postScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
SkMatrix & setTranslate(SkScalar dx, SkScalar dy)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
SkCanvas * beginRecording(const SkRect &bounds, sk_sp< SkBBoxHierarchy > bbh)
sk_sp< SkPicture > finishRecordingAsPicture()
GM(SkColor backgroundColor=SK_ColorWHITE)
constexpr SkScalar kPictureSize
constexpr SkScalar kFillSize
static void draw_scene(SkCanvas *canvas, SkScalar pictureSize)
constexpr struct @268 tiles[]
constexpr unsigned kRowSize
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkRect MakeWH(float w, float h)