1 /*
2  * Copyright 2018 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkOpPathEffect_DEFINED
9 #define SkOpPathEffect_DEFINED
10 
11 #include "SkPathEffect.h"
12 #include "SkPaint.h"
13 #include "SkPathOps.h"
14 
15 class SkMergePathEffect {
16 public:
17     /*  Defers to two other patheffects, and then combines their outputs using the specified op.
18      *  e.g.
19      *      result = output_one op output_two
20      *
21      *  If either one or two is nullptr, then the original path is passed through to the op.
22      */
23     static sk_sp<SkPathEffect> Make(sk_sp<SkPathEffect> one, sk_sp<SkPathEffect> two, SkPathOp op);
24 };
25 
26 class SkMatrixPathEffect {
27 public:
28     static sk_sp<SkPathEffect> MakeTranslate(SkScalar dx, SkScalar dy);
29     static sk_sp<SkPathEffect> Make(const SkMatrix&);
30 };
31 
32 class SkStrokePathEffect {
33 public:
34     static sk_sp<SkPathEffect> Make(SkScalar width, SkPaint::Join, SkPaint::Cap,
35                                     SkScalar miter = 4);
36 };
37 
38 #endif
39