Package net.paulhertz.pixelaudio.curves

# Class PALineVertex

java.lang.Object
net.paulhertz.pixelaudio.curves.PALineVertex

All Implemented Interfaces:
  `PAVertex2DINF`

public class PALineVertex extends Object implements PAVertex2DINF
Stores a line vertex consisting of a single point. Adapted from IgnoCodeLib Processing library for use with PixelAudio library. IgnoCodeLib is available in the Processing contributed libraries and at https://paulhertz.net/ignocodelib/ and https://github.com/Ignotus-mago/IgnoCodeLib3

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `segmentType`
  path segment type
  `protected float`
  `x`
  x-coordinate of anchor point
  `protected float`
  `y`
  y-coordinate of anchor point

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PALineVertex()`
  `PALineVertex(float x, float y)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PALineVertex`
  `clone()`
  `float[]`
  `coords()`
  `void`
  `draw(processing.core.PApplet parent)`
  Draws a path to the display.
  `void`
  `draw(processing.core.PGraphics pg)`
  Draws a path to an offscreen buffer.
  `void`
  `mark(processing.core.PApplet parent)`
  Draws marks at vertices and control points.
  `void`
  `mark(processing.core.PGraphics pg)`
  Draws marks at vertices and control points to an off-screen PGraphics.
  `int`
  `segmentType()`
  `void`
  `setX(float newX)`
  `void`
  `setY(float newY)`
  `void`
  `write(PrintWriter output)`
  Writes graphics operator and values to an output.
  `float`
  `x()`
  `float`
  `y()`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### x

    protected float x
    x-coordinate of anchor point

  - ### y

    protected float y
    y-coordinate of anchor point

  - ### segmentType

    public static final int segmentType
    path segment type
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### PALineVertex

    public PALineVertex(float x, float y)

  - ### PALineVertex

    public PALineVertex()

- ## Method Details

  - ### x

    public float x()
    Specified by:
      `x` in interface `PAVertex2DINF`
    Returns:
      x-coordinate as a float

  - ### setX

    public void setX(float newX)

  - ### y

    public float y()
    Specified by:
      `y` in interface `PAVertex2DINF`
    Returns:
      y-coordinate as a float

  - ### setY

    public void setY(float newY)

  - ### segmentType

    public int segmentType()
    Specified by:
      `segmentType` in interface `PAVertex2DINF`
    Returns:
      type of segment, either BezShape.LINE_SEGMENT or BezShape.CURVE_SEGMENT

  - ### coords

    public float[] coords()
    Specified by:
      `coords` in interface `PAVertex2DINF`
    Returns:
      coordinates as an array of float

  - ### clone

    public PALineVertex clone()
    Specified by:
      `clone` in interface `PAVertex2DINF`
    Overrides:
      `clone` in class `Object`
    Returns:
      a deep copy of a Vertex2DINF

  - ### draw

    public void draw(processing.core.PApplet parent)
    Description copied from interface: `PAVertex2DINF`
    Draws a path to the display. It is only valid to call this within a Processing beginShape/endShape pair where an initial vertex has been set with a call to vertex().
    Specified by:
      `draw` in interface `PAVertex2DINF`
    Parameters:
      `parent` - the PApplet that handles drawing

  - ### draw

    public void draw(processing.core.PGraphics pg)
    Description copied from interface: `PAVertex2DINF`
    Draws a path to an offscreen buffer. It is only valid to call this within a Processing beginShape/endShape pair where an initial vertex has been set with a call to vertex().
    Specified by:
      `draw` in interface `PAVertex2DINF`
    Parameters:
      `pg` - a PGraphics instance

  - ### mark

    public void mark(processing.core.PApplet parent)
    Description copied from interface: `PAVertex2DINF`
    Draws marks at vertices and control points.
    Specified by:
      `mark` in interface `PAVertex2DINF`

  - ### mark

    public void mark(processing.core.PGraphics pg)
    Description copied from interface: `PAVertex2DINF`
    Draws marks at vertices and control points to an off-screen PGraphics.
    Specified by:
      `mark` in interface `PAVertex2DINF`

  - ### write

    public void write(PrintWriter output)
    Description copied from interface: `PAVertex2DINF`
    Writes graphics operator and values to an output.
    Specified by:
      `write` in interface `PAVertex2DINF`
    Parameters:
      `output` - a Java PrintWriter instance