68 SkVector radii[4] = {{4, 6}, {12, 8}, {24, 16}, {32, 48}};
72 SkVector radii2[4] = {{0, 0}, {80, 60}, {0, 0}, {80, 60}};
107 void drawShapes(
SkCanvas* canvas)
const override {
111 paint.setColor(rand.nextU() & ~0x808080);
112 paint.setAlphaf(0.5f);
139 void drawShapes(
SkCanvas* canvas)
const override {
174 inner.
transform(innerXform, &xformedInner);
177 paint.setAlphaf(0.5f);
190DEF_GM(
return new SimpleShapesGM(
true); )
191DEF_GM(
return new SimpleShapesGM(
false); )
192DEF_GM(
return new InnerShapesGM(
true); )
193DEF_GM(
return new InnerShapesGM(
false); )
constexpr SkColor SK_ColorWHITE
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawOval(const SkRect &oval, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void clear(SkColor color)
void rotate(SkScalar degrees)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void drawDRRect(const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
SkImageInfo imageInfo() const
SkMatrix & setTranslate(SkScalar dx, SkScalar dy)
SkMatrix & preTranslate(SkScalar dx, SkScalar dy)
SkMatrix & preScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
void setAntiAlias(bool aa)
const SkRect & rect() const
@ kOval_Type
non-zero width and height filled with radii
@ kRect_Type
non-zero width and height, and zeroed radii
bool transform(const SkMatrix &matrix, SkRRect *dst) const
void setOval(const SkRect &oval)
void setRectRadii(const SkRect &rect, const SkVector radii[4])
void setRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
void setNinePatch(const SkRect &rect, SkScalar leftRad, SkScalar topRad, SkScalar rightRad, SkScalar bottomRad)
void setRect(const SkRect &rect)
void append(const char text[])
GM(SkColor backgroundColor=SK_ColorWHITE)
InnerShapesGM(bool antialias)
SkString getName() const override
virtual void drawShapes(SkCanvas *canvas) const =0
ShapesGM(const char *name, bool antialias)
void onDraw(SkCanvas *canvas) override
TArray< SkScalar > fRotations
void onOnceBeforeDraw() override
SkISize getISize() override
TArray< SkRRect > fShapes
SimpleShapesGM(bool antialias)
static float min(float r, float g, float b)
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
DEF_SWITCHES_START aot vmservice shared library name
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
constexpr float centerX() const
constexpr float height() const
constexpr float centerY() const
constexpr float width() const