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 "include/core/SkMatrix.h"
12#include "include/core/SkPaint.h"
13#include "include/core/SkPathEffect.h"
14#include "include/pathops/SkPathOps.h"
15
16class SK_API SkMergePathEffect {
17public:
18    /*  Defers to two other patheffects, and then combines their outputs using the specified op.
19     *  e.g.
20     *      result = output_one op output_two
21     *
22     *  If either one or two is nullptr, then the original path is passed through to the op.
23     */
24    static sk_sp<SkPathEffect> Make(sk_sp<SkPathEffect> one, sk_sp<SkPathEffect> two, SkPathOp op);
25};
26
27class SK_API SkMatrixPathEffect {
28public:
29    static sk_sp<SkPathEffect> MakeTranslate(SkScalar dx, SkScalar dy);
30    static sk_sp<SkPathEffect> Make(const SkMatrix&);
31};
32
33class SK_API SkStrokePathEffect {
34public:
35    static sk_sp<SkPathEffect> Make(SkScalar width, SkPaint::Join, SkPaint::Cap,
36                                    SkScalar miter = 4);
37};
38
39#endif
40