blob: fde3292a67e31eed044c2ff2c7c895e33348ec0e [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
Florin Malita827af662018-03-09 16:08:58 -050013#include "SkTrimPathEffect.h"
14
Mike Reed41232232018-03-07 17:02:47 -050015class SkTrimPE : public SkPathEffect {
16public:
Florin Malita827af662018-03-09 16:08:58 -050017 SkTrimPE(SkScalar startT, SkScalar stopT, SkTrimPathEffect::Mode);
Mike Reed41232232018-03-07 17:02:47 -050018
19 bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const override;
20
21 SK_TO_STRING_OVERRIDE()
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTrimPE)
23
24protected:
25 void flatten(SkWriteBuffer&) const override;
26
27private:
Florin Malita827af662018-03-09 16:08:58 -050028 const SkScalar fStartT,
29 fStopT;
30 const SkTrimPathEffect::Mode fMode;
Mike Reed41232232018-03-07 17:02:47 -050031
32 typedef SkPathEffect INHERITED;
33};
34
35#endif