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