52 paint.setColor(0xff00aa80);
59 bool isAA = element->isAA();
60 switch (element->getDeviceSpaceType()) {
65 canvas->
clipPath(element->getDeviceSpacePath(), op, isAA);
68 canvas->
clipRRect(element->getDeviceSpaceRRect(), op, isAA);
71 canvas->
clipRect(element->getDeviceSpaceRect(), op, isAA);
98 SkVector complxRadii[4] = {{6, 4}, {8, 12}, {16, 24}, {48, 32}};
102 return this->coverClipStack(stack, canvas, errorMsg);
105DEF_GM(
return new WindowRectanglesGM(); )
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void clipShader(sk_sp< SkShader >, SkClipOp=SkClipOp::kIntersect)
void clipRRect(const SkRRect &rrect, SkClipOp op, bool doAntiAlias)
@ kPath
This element does not have geometry, but applies a shader to the clip.
@ kEmpty
This element makes the clip empty (regardless of previous elements).
@ kRect
This element combines a device space round-rect with the current clip.
@ kRRect
This element combines a device space path with the current clip.
void clipRect(const SkRect &, const SkMatrix &matrix, SkClipOp, bool doAA)
void clipRRect(const SkRRect &, const SkMatrix &matrix, SkClipOp, bool doAA)
static const SkMatrix & I()
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
void setRectRadii(const SkRect &rect, const SkVector radii[4])
void setNinePatch(const SkRect &rect, SkScalar leftRad, SkScalar topRad, SkScalar rightRad, SkScalar bottomRad)
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
constexpr int32_t height() const
constexpr int32_t width() const
static constexpr SkISize Make(int32_t w, int32_t h)
static SkRect Make(const SkISize &size)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkIRect kCoverRect
static constexpr SkIRect kDeviceRect