net.paulhertz.aifile
Interface Vertex2DINF

All Known Implementing Classes:
BezVertex, LineVertex

public interface Vertex2DINF

Interface for line and curve vertices. TODO provide drawing commands for display of anchor points and direction points


Method Summary
 Vertex2DINF clone()
           
 float[] coords()
           
 void draw(PApplet parent)
          Draws a path to the display.
 void draw(PGraphics pg)
          Draws a path to an offscreen buffer.
 int segmentType()
           
 void write(PrintWriter output)
          Writes a path segment to file.
 float x()
           
 float y()
           
 

Method Detail

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

Vertex2DINF clone()
Returns:
a deep copy of a Vertex2DINF

draw

void draw(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(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

write

void write(PrintWriter output)
Writes a path segment to file. Multiple calls to this method should be bracketed by AIFileWriter.psMoveTo and AIFileWriter.paintPath commands

Parameters:
output - a PrintWriter for output to file


Processing library IgnoCodeLib by Paul Hertz. (C) 2013