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 SkTrimImpl_DEFINED |
9 | #define SkTrimImpl_DEFINED |
10 | |
11 | #include "include/core/SkPathEffect.h" |
12 | |
13 | #include "include/effects/SkTrimPathEffect.h" |
14 | |
15 | class SkTrimPE : public SkPathEffect { |
16 | public: |
17 | SkTrimPE(SkScalar startT, SkScalar stopT, SkTrimPathEffect::Mode); |
18 | |
19 | protected: |
20 | void flatten(SkWriteBuffer&) const override; |
21 | bool onFilterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const override; |
22 | |
23 | private: |
24 | SK_FLATTENABLE_HOOKS(SkTrimPE) |
25 | |
26 | const SkScalar fStartT, |
27 | fStopT; |
28 | const SkTrimPathEffect::Mode fMode; |
29 | |
30 | typedef SkPathEffect INHERITED; |
31 | }; |
32 | |
33 | #endif |
34 |