Flutter Engine
The Flutter Engine
SkTrimPE.h
Go to the documentation of this file.
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
13
14class SkTrimPE : public SkPathEffectBase {
15public:
17
18protected:
19 void flatten(SkWriteBuffer&) const override;
20 bool onFilterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*,
21 const SkMatrix&) const override;
22
23private:
25
26 bool computeFastBounds(SkRect* bounds) const override {
27 // Trimming a path returns a subset of the input path so just return true and leave bounds
28 // unmodified
29 return true;
30 }
31
32 const SkScalar fStartT,
33 fStopT;
34 const SkTrimPathEffect::Mode fMode;
35
37};
38
39#endif
#define SK_FLATTENABLE_HOOKS(type)
Definition: SkPath.h:59
bool onFilterPath(SkPath *dst, const SkPath &src, SkStrokeRec *, const SkRect *, const SkMatrix &) const override
void flatten(SkWriteBuffer &) const override
SkTrimPE(SkScalar startT, SkScalar stopT, SkTrimPathEffect::Mode)
float SkScalar
Definition: extension.cpp:12
Optional< SkRect > bounds
Definition: SkRecords.h:189
dst
Definition: cp.py:12