34 , fAntiAlias(antiAlias) {
67 fRects[0].
setLTRB(xB, yB, xE, yE);
72 fRects[1].
setLTRB(xA, yA, xD, yD);
77 fRects[2].
setLTRB(xC, yA, xF, yD);
82 fRects[3].
setLTRB(xA, yC, xD, yF);
87 fRects[4].
setLTRB(xC, yC, xF, yF);
98 for (
int i = 0; i <
kRows; ++i) {
99 for (
int j = 0; j <
kCols; ++j) {
100 for (
int k = 0; k < 5; ++k) {
107 inline static constexpr int kRows = 5;
108 inline static constexpr int kCols = 5;
109 inline static constexpr int kPadX = 20;
110 inline static constexpr int kPadY = 20;
131 str.
printf(
"complexclip2_%s_%s",
133 fAntiAlias ?
"aa" :
"bw");
150 for (
int i = 0; i <
kRows; ++i) {
151 for (
int j = 0; j <
kCols; ++j) {
159 for (
int k = 0; k < 5; ++k) {
163 canvas->
drawRect(fRects[k], rectPaint);
166 canvas->
drawRRect(fRRects[k], rectPaint);
169 canvas->
drawPath(fPaths[k], rectPaint);
174 for (
int k = 0; k < 5; ++k) {
211 using INHERITED =
GM;
#define SkDEBUGFAIL(message)
constexpr SkColor SK_ColorYELLOW
#define SkColorSetRGB(r, g, b)
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
#define SkScalarRoundToInt(x)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void drawPath(const SkPath &path, const SkPaint &paint)
void clipRRect(const SkRRect &rrect, SkClipOp op, bool doAntiAlias)
void setStyle(Style style)
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
static SkPath RRect(const SkRRect &, SkPathDirection dir=SkPathDirection::kCW)
void setRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
void printf(const char format[],...) SK_PRINTF_LIKE(2
static constexpr int kCols
static constexpr int kPadY
static constexpr int kRows
static const char * ClipStr(Clip clip)
static constexpr int kPadX
SkString getName() const override
void onOnceBeforeDraw() override
SkISize getISize() override
ComplexClip2GM(Clip clip, bool antiAlias)
void onDraw(SkCanvas *canvas) override
static constexpr SkISize Make(int32_t w, int32_t h)
void setLTRB(float left, float top, float right, float bottom)
static constexpr SkRect MakeWH(float w, float h)