46 {
48
49 SkRect r1 = { 10, 20, 70, 80 };
51 .
arcTo(r1, 30, 300,
false)
54
55 SkPath* firstClip = &clipSimple;
56 SkPath* secondClip = &clipComplex;
57 if (!fDoSimpleClipFirst) {
58 std::swap(firstClip, secondClip);
59 }
60
62 paint.setAntiAlias(
true);
63
65
66 constexpr struct {
69 } gOps[] = {
72 };
73
76
80
81 for (int invA = 0; invA < 2; ++invA) {
82 for (int aaBits = 0; aaBits < 4; ++aaBits) {
84 for (size_t op = 0; op < std::size(gOps); ++op) {
85 for (int invB = 0; invB < 2; ++invB) {
91
97 canvas->
clipPath(*secondClip, gOps[op].fOp, doAAB);
98
99
100 SkRect r = { 0, 0, 100, 100 };
103
104
108 str.
printf(
"%s%s %s %s%s", doAAA ?
"A" :
"B",
109 doInvA ? "I" : "N",
111 doAAB ? "A" : "B",
112 doInvB ? "I" : "N");
113
115 if (doInvB) {
117 } else {
119 }
120 }
121 }
124 }
125 }
126 }
constexpr SkColor SK_ColorBLACK
static constexpr bool SkToBool(const T &x)
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void setColor(SkColor color)
void setAntiAlias(bool aa)
SkPathBuilder & arcTo(const SkRect &oval, SkScalar startAngleDeg, SkScalar sweepAngleDeg, bool forceMoveTo)
SkPathBuilder & moveTo(SkPoint pt)
void setFillType(SkPathFillType ft)
static SkPath Circle(SkScalar center_x, SkScalar center_y, SkScalar radius, SkPathDirection dir=SkPathDirection::kCW)
const char * c_str() const
font
Font Metadata and Metrics.
constexpr SkColor gPathColor