aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/math/geom/plane/WindingRule.java
blob: d7881b6db554bedb88d128e5788594422b4140a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.jogamp.math.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;
    }
}