Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
effects
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
11
#include "
include/effects/SkTrimPathEffect.h
"
12
#include "
src/core/SkPathEffectBase.h
"
13
14
class
SkTrimPE
:
public
SkPathEffectBase
{
15
public
:
16
SkTrimPE
(
SkScalar
startT,
SkScalar
stopT,
SkTrimPathEffect::Mode
);
17
18
protected
:
19
void
flatten
(
SkWriteBuffer
&)
const override
;
20
bool
onFilterPath
(
SkPath
* dst,
const
SkPath
& src,
SkStrokeRec
*,
const
SkRect
*,
21
const
SkMatrix
&)
const override
;
22
23
private
:
24
SK_FLATTENABLE_HOOKS
(
SkTrimPE
)
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
36
using
INHERITED =
SkPathEffectBase
;
37
};
38
39
#endif
SK_FLATTENABLE_HOOKS
#define SK_FLATTENABLE_HOOKS(type)
Definition
SkFlattenable.h:108
SkPathEffectBase.h
SkTrimPathEffect.h
SkMatrix
Definition
SkMatrix.h:54
SkPathEffectBase
Definition
SkPathEffectBase.h:19
SkPathEffectBase::SkPathEffectBase
SkPathEffectBase()
Definition
SkPathEffectBase.h:21
SkPath
Definition
SkPath.h:59
SkStrokeRec
Definition
SkStrokeRec.h:22
SkTrimPE
Definition
SkTrimPE.h:14
SkTrimPE::onFilterPath
bool onFilterPath(SkPath *dst, const SkPath &src, SkStrokeRec *, const SkRect *, const SkMatrix &) const override
Definition
SkTrimPathEffect.cpp:66
SkTrimPE::flatten
void flatten(SkWriteBuffer &) const override
Definition
SkTrimPathEffect.cpp:116
SkTrimPE::computeFastBounds
bool computeFastBounds(SkRect *bounds) const override
Definition
SkTrimPE.h:26
SkTrimPathEffect::Mode
Mode
Definition
SkTrimPathEffect.h:19
SkWriteBuffer
Definition
SkWriteBuffer.h:41
SkScalar
float SkScalar
Definition
extension.cpp:12
SkRect
Definition
extension.cpp:13
Generated on Fri Apr 26 2024 06:16:54 for Flutter Engine by
1.9.8