Flutter Engine
The Flutter Engine
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
11enum class SkPathFillType {
12 /** Specifies that "inside" is computed by a non-zero sum of signed edge crossings */
14 /** Specifies that "inside" is computed by an odd number of edge crossings */
16 /** Same as Winding, but draws outside of the path, rather than inside */
18 /** Same as EvenOdd, but draws outside of the path, rather than inside */
20};
21
23 return (static_cast<int>(ft) & 1) != 0;
24}
25
27 return (static_cast<int>(ft) & 2) != 0;
28}
29
31 return static_cast<SkPathFillType>(static_cast<int>(ft) & 1);
32}
33
34enum class SkPathDirection {
35 /** clockwise direction for adding closed contours */
36 kCW,
37 /** counter-clockwise direction for adding closed contours */
38 kCCW,
39};
40
46};
47
48enum class SkPathVerb {
49 kMove, //!< SkPath::RawIter returns 1 point
50 kLine, //!< SkPath::RawIter returns 2 points
51 kQuad, //!< SkPath::RawIter returns 3 points
52 kConic, //!< SkPath::RawIter returns 3 points + 1 weight
53 kCubic, //!< SkPath::RawIter returns 4 points
54 kClose //!< SkPath::RawIter returns 0 points
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
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
SkPathVerb
Definition: SkPathTypes.h:48
@ kClose
SkPath::RawIter returns 0 points.
@ kConic
SkPath::RawIter returns 3 points + 1 weight.
@ kMove
Definition: embedder.h:985