Interface PAVertex2DINF

All Known Implementing Classes:
PABezVertex, PALineVertex

public interface PAVertex2DINF
Interface for line and curve vertices. Classes that implement this interface must implement all the methods listed below. 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
  • Method Summary

    Modifier and Type
    Method
    Description
     
    float[]
     
    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
     
    float
    x()
     
    float
    y()
     
  • Method Details

    • x

      float x()
      Returns:
      x-coordinate as a float
    • y

      float y()
      Returns:
      y-coordinate as a float
    • segmentType

      int segmentType()
      Returns:
      type of segment, either BezShape.LINE_SEGMENT or BezShape.CURVE_SEGMENT
    • coords

      float[] coords()
      Returns:
      coordinates as an array of float
    • clone

      PAVertex2DINF clone()
      Returns:
      a deep copy of a Vertex2DINF
    • draw

      void draw(processing.core.PApplet parent)
      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().
      Parameters:
      parent - the PApplet that handles drawing
    • draw

      void draw(processing.core.PGraphics pg)
      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().
      Parameters:
      pg - a PGraphics instance
    • mark

      void mark(processing.core.PApplet parent)
      Draws marks at vertices and control points.
    • mark

      void mark(processing.core.PGraphics pg)
      Draws marks at vertices and control points to an off-screen PGraphics.