blob: 2cd39c47934fec53161b42618f1ec46e3881264b [file] [log] [blame]
Mike Reed41232232018-03-07 17:02:47 -05001/*
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 "SkPathEffect.h"
12
13class SkTrimPE : public SkPathEffect {
14public:
15 SkTrimPE(SkScalar startT, SkScalar stopT);
16
17 bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const override;
18
19 SK_TO_STRING_OVERRIDE()
20 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTrimPE)
21
22protected:
23 void flatten(SkWriteBuffer&) const override;
24
25private:
26 const SkScalar fStartT;
27 const SkScalar fStopT;
28
29 typedef SkPathEffect INHERITED;
30};
31
32#endif