31 const unsigned twoColor = 0x807F1f1f;
55 paint->setAntiAlias(
true);
67 for (
int oneFill = 0; oneFill <= 1; ++oneFill) {
70 for (
int twoFill = 0; twoFill <= 1; ++twoFill) {
77 two.setFillType(twoF);
78 two.addRect(40, 40, 100, 100);
83 canvas->
drawPath(one, fOutlinePaint);
109 using INHERITED =
GM;
114DEF_GM(
return new PathOpsInverseGM; )
121 const char* svgStr[] = {
122 "M474.889 27.0952C474.889 27.1002 474.888 27.1018 474.889 27.1004L479.872 27.5019C479.883 27.3656 479.889 27.2299 479.889 27.0952L474.889 27.0952L474.889 27.0952Z",
123 "M474.94 26.9405C474.93 26.9482 474.917 26.9576 474.901 26.9683L477.689 31.1186C477.789 31.0512 477.888 30.9804 477.985 30.9059L474.94 26.9405L474.94 26.9405Z"
129 for (
int i = 0;
i < 2;
i++)
137 auto r =
path[0].getBounds();
138 canvas->translate(30, 30);
139 canvas->scale(200 / r.width(), 200 / r.width());
140 canvas->translate(-r.fLeft, -r.fTop);
144 paint.setAntiAlias(
true);
146 paint.setStrokeWidth(0);
153 canvas->drawPath(resultPath,
paint);
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
@ kReverseDifference_SkPathOp
subtract the first path from the op path
@ kDifference_SkPathOp
subtract the op path from the first path
@ kIntersect_SkPathOp
intersect the two paths
@ kUnion_SkPathOp
union (inclusive-or) the two paths
@ kXOR_SkPathOp
exclusive-or the two paths
void allocN32Pixels(int width, int height, bool isOpaque=false)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
void drawPath(const SkPath &path, const SkPaint &paint)
void setStyle(Style style)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
static bool FromSVGString(const char str[], SkPath *)
void setFillType(SkPathFillType ft)
SkPath & addRect(const SkRect &rect, SkPathDirection dir, unsigned start)
GM(SkColor backgroundColor=SK_ColorWHITE)
SkString getName() const override
void makePaint(SkPaint *paint, SkColor color)
void onOnceBeforeDraw() override
SkColor blend(SkColor one, SkColor two)
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
DEF_SIMPLE_GM(pathops_skbug_10155, canvas, 256, 256)
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkRect MakeWH(float w, float h)