Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: include/core/SkPathTypes.h

Issue 1126993003: experimental path-builder Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPathIter.h ('k') | include/core/SkROPath.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPathTypes.h
diff --git a/include/core/SkPathTypes.h b/include/core/SkPathTypes.h
new file mode 100644
index 0000000000000000000000000000000000000000..2a9b2642b0f5e96ee2cdc9f5693471ede6a6c00f
--- /dev/null
+++ b/include/core/SkPathTypes.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkPathTypes_DEFINED
+#define SkPathTypes_DEFINED
+
+#include "SkTypes.h"
+
+enum SkPathFillType {
+ /** Specifies that "inside" is computed by a non-zero sum of signed edge crossings */
+ kWinding_SkPathFillType,
+ /** Specifies that "inside" is computed by an odd number of edge crossings */
+ kEvenOdd_SkPathFillType,
+ /** Same as Winding, but draws outside of the path, rather than inside */
+ kInverseWinding_SkPathFillType,
+ /** Same as EvenOdd, but draws outside of the path, rather than inside */
+ kInverseEvenOdd_SkPathFillType
+};
+
+static inline bool SkPathFillTypeIsInverse(SkPathFillType ft) {
+ return SkToBool(ft & 2);
+}
+
+enum SkPathConvexityType {
+ kUnknown_SkPathConvexityType,
+ kConvex_SkPathConvexityType,
+ kConcave_SkPathConvexityType
+};
+
+enum SkPathDirection {
+ /** Direction either has not been or could not be computed */
+ kUnknown_SkPathDirection,
+ /** clockwise direction for adding closed contours */
+ kCW_SkPathDirection,
+ /** counter-clockwise direction for adding closed contours */
+ kCCW_SkPathDirection,
+};
+
+enum SkPathSegmentMask {
+ kLine_SkPathSegmentMask = 1 << 0,
+ kQuad_SkPathSegmentMask = 1 << 1,
+ kConic_SkPathSegmentMask = 1 << 2,
+ kCubic_SkPathSegmentMask = 1 << 3,
+};
+
+enum SkPathVerb {
+ kMove_SkPathVerb, //!< iter.next returns 1 point
+ kLine_SkPathVerb, //!< iter.next returns 2 points
+ kQuad_SkPathVerb, //!< iter.next returns 3 points
+ kConic_SkPathVerb, //!< iter.next returns 3 points + iter.conicWeight()
+ kCubic_SkPathVerb, //!< iter.next returns 4 points
+ kClose_SkPathVerb, //!< iter.next returns 1 point (contour's moveTo pt)
+ kDone_SkPathVerb, //!< iter.next returns 0 points
+};
+
+#endif
« no previous file with comments | « include/core/SkPathIter.h ('k') | include/core/SkROPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698