Package icyllis.arc3d.core

# Interface PathIterator

public interface PathIterator
Iterates `Path` elements.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `FILL_EVEN_ODD`
  The fill rule constant for specifying an even-odd rule for determining the interior of a path.
  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.
  `static final int`
  `FILL_NON_ZERO`
  The fill rule constant for specifying a non-zero rule for determining the interior of a path.
  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.
  `static final int`
  `VERB_CLOSE`
  Primitive commands of path segments.
  `static final int`
  `VERB_CUBIC`
  Primitive commands of path segments.
  `static final int`
  `VERB_DONE`
  Primitive commands of path segments.
  `static final int`
  `VERB_LINE`
  Primitive commands of path segments.
  `static final int`
  `VERB_MOVE`
  Primitive commands of path segments.
  `static final int`
  `VERB_QUAD`
  Primitive commands of path segments.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getFillRule()`
  Returns the filling rule for determining the interior of the path.
  `int`
  `next(float[] coords, int offset)`
  Returns next verb, and advances iterator.

- ## Field Details

  - ### FILL_NON_ZERO

    static final int FILL_NON_ZERO
    The fill rule constant for specifying a non-zero rule for determining the interior of a path.
    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.
    See Also:
      - Constant Field Values

  - ### FILL_EVEN_ODD

    static final int FILL_EVEN_ODD
    The fill rule constant for specifying an even-odd rule for determining the interior of a path.
    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.
    See Also:
      - Constant Field Values

  - ### VERB_MOVE

    static final int VERB_MOVE
    Primitive commands of path segments.
    See Also:
      - Constant Field Values

  - ### VERB_LINE

    static final int VERB_LINE
    Primitive commands of path segments.
    See Also:
      - Constant Field Values

  - ### VERB_QUAD

    static final int VERB_QUAD
    Primitive commands of path segments.
    See Also:
      - Constant Field Values

  - ### VERB_CUBIC

    static final int VERB_CUBIC
    Primitive commands of path segments.
    See Also:
      - Constant Field Values

  - ### VERB_CLOSE

    static final int VERB_CLOSE
    Primitive commands of path segments.
    See Also:
      - Constant Field Values

  - ### VERB_DONE

    static final int VERB_DONE
    Primitive commands of path segments.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getFillRule

    int getFillRule()
    Returns the filling rule for determining the interior of the path.
    Returns:
      the winding rule.
    See Also:
      - `FILL_EVEN_ODD`
      - `FILL_NON_ZERO`

  - ### next

    int next(float[] coords, int offset)
    Returns next verb, and advances iterator. If there are no more elements, returns `VERB_DONE`.

    Zero to three points are stored in coords, depending on the command type.

    A float array of length >= 6 must be passed in and can be used to store the coordinates of the point(s). Each point is stored as a pair of float x,y coordinates.

    - MOVE returns 1 point
    - LINE returns 1 point
    - QUAD returns 2 points
    - CUBIC returns 3 points
    - CLOSE does not return any points
    Parameters:
      `coords` - array for point data describing returned verb, can be null
    Returns:
      next verb