Skia
2D Graphics Library
SkPathTypes.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Google LLC.
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 SkPathTypes_DEFINED
9 #define SkPathTypes_DEFINED
10 
11 enum class SkPathFillType {
13  kWinding,
15  kEvenOdd,
20 };
21 
22 static inline bool SkPathFillType_IsEvenOdd(SkPathFillType ft) {
23  return (static_cast<int>(ft) & 1) != 0;
24 }
25 
26 static inline bool SkPathFillType_IsInverse(SkPathFillType ft) {
27  return (static_cast<int>(ft) & 2) != 0;
28 }
29 
31  return static_cast<SkPathFillType>(static_cast<int>(ft) & 1);
32 }
33 
34 enum class SkPathDirection {
36  kCW,
38  kCCW,
39 };
40 
46 };
47 
48 enum class SkPathVerb {
49  kMove,
50  kLine,
51  kQuad,
52  kConic,
53  kCubic,
54  kClose
55 };
56 
57 #endif
SkPathSegmentMask
Definition: SkPathTypes.h:41
@ kCubic_SkPathSegmentMask
Definition: SkPathTypes.h:45
@ kConic_SkPathSegmentMask
Definition: SkPathTypes.h:44
@ kQuad_SkPathSegmentMask
Definition: SkPathTypes.h:43
@ kLine_SkPathSegmentMask
Definition: SkPathTypes.h:42
static bool SkPathFillType_IsInverse(SkPathFillType ft)
Definition: SkPathTypes.h:26
SkPathDirection
Definition: SkPathTypes.h:34
@ kCCW
counter-clockwise direction for adding closed contours
@ kCW
clockwise direction for adding closed contours
static bool SkPathFillType_IsEvenOdd(SkPathFillType ft)
Definition: SkPathTypes.h:22
static SkPathFillType SkPathFillType_ConvertToNonInverse(SkPathFillType ft)
Definition: SkPathTypes.h:30
SkPathFillType
Definition: SkPathTypes.h:11
@ kInverseWinding
Same as Winding, but draws outside of the path, rather than inside.
@ kWinding
Specifies that "inside" is computed by a non-zero sum of signed edge crossings.
@ kInverseEvenOdd
Same as EvenOdd, but draws outside of the path, rather than inside.
@ kEvenOdd
Specifies that "inside" is computed by an odd number of edge crossings.
SkPathVerb
Definition: SkPathTypes.h:48
@ kClose
SkPath::RawIter returns 0 points.
@ kCubic
SkPath::RawIter returns 4 points.
@ kConic
SkPath::RawIter returns 3 points + 1 weight.
@ kQuad
SkPath::RawIter returns 3 points.
@ kMove
SkPath::RawIter returns 1 point.
@ kLine
SkPath::RawIter returns 2 points.