Skia
2D Graphics Library
SkTrimPathEffect.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 SkTrimPathEffect_DEFINED
9 #define SkTrimPathEffect_DEFINED
10 
11 #include "include/core/SkRefCnt.h"
12 #include "include/core/SkScalar.h"
13 #include "include/core/SkTypes.h"
14 
15 class SkPathEffect;
16 
17 class SK_API SkTrimPathEffect {
18 public:
19  enum class Mode {
20  kNormal, // return the subset path [start,stop]
21  kInverted, // return the complement/subset paths [0,start] + [stop,1]
22  };
23 
42  static sk_sp<SkPathEffect> Make(SkScalar startT, SkScalar stopT, Mode = Mode::kNormal);
43 };
44 
45 #endif
@ kNormal
glyph outlines modified to improve constrast
float SkScalar
Definition: SkScalar.h:14
SkPathEffect is the base class for objects in the SkPaint that affect the geometry of a drawing primi...
Definition: SkPathEffect.h:28
Definition: SkTrimPathEffect.h:17
Mode
Definition: SkTrimPathEffect.h:19
static sk_sp< SkPathEffect > Make(SkScalar startT, SkScalar stopT, Mode=Mode::kNormal)
Take start and stop "t" values (values between 0...1), and return a path that is that subset of the o...