aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/geom/plane/WindingRule.java
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2023-02-06 02:31:14 +0100
committerSven Gothel <sgothel@jausoft.com>2023-02-06 02:31:14 +0100
commit18fc81fab7ba11ae3a4cdd1e94c199371f7c2e91 (patch)
treed9fd6d156317270bb3bf536ab88a4c632ad12ab3 /src/jogl/classes/com/jogamp/graph/geom/plane/WindingRule.java
parenta671e88c59153a39e46a64f2cb924d205f06e3f8 (diff)
Graph: Path2D -> self-contained Path2D (w/ Iterator) fixed; OutlineShape: Add Path2F addPath(..), emphasize required Winding.CW
GPURegionGLListener01 used by TestRegionRendererNEWT01 covers Path2F CCW and CW (reverse add) methods.
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/geom/plane/WindingRule.java')
-rw-r--r--src/jogl/classes/com/jogamp/graph/geom/plane/WindingRule.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/geom/plane/WindingRule.java b/src/jogl/classes/com/jogamp/graph/geom/plane/WindingRule.java
new file mode 100644
index 000000000..46ef167a3
--- /dev/null
+++ b/src/jogl/classes/com/jogamp/graph/geom/plane/WindingRule.java
@@ -0,0 +1,28 @@
+package com.jogamp.graph.geom.plane;
+
+/**
+ * Winding rule, either EVEN_ODD or NON_ZERO (like for TrueType fonts).
+ */
+public enum WindingRule {
+ /**
+ * The even-odd rule specifies that a point lies inside the path
+ * if a ray drawn in any direction from that point to infinity is crossed by path segments
+ * an odd number of times.
+ */
+ EVEN_ODD(0),
+
+ /**
+ * The non-zero rule specifies that a point lies inside the path
+ * if a ray drawn in any direction from that point to infinity is crossed by path segments
+ * a different number of times in the counter-clockwise direction than the clockwise direction.
+ *
+ * Non-zero winding rule is used by TrueType fonts.
+ */
+ NON_ZERO(1);
+
+ public final int value;
+
+ WindingRule(final int v) {
+ this.value = v;
+ }
+}