net.paulhertz.aifile
Class BezCurve

java.lang.Object
  extended by net.paulhertz.aifile.DisplayComponent
      extended by net.paulhertz.aifile.BezShape
          extended by net.paulhertz.aifile.BezCurve
All Implemented Interfaces:
ColorableINF, Visitable

public class BezCurve
extends BezShape

Provides factory methods to construct a single Bezier curve.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.paulhertz.aifile.BezShape
BezShape.BezType
 
Field Summary
 
Fields inherited from class net.paulhertz.aifile.BezShape
bezType, CURVE_SEGMENT, KAPPA, LINE_SEGMENT
 
Method Summary
static BezCurve makeCurve(float ax1, float ay1, float cx1, float cy1, float cx2, float cy2, float ax2, float ay2)
          Constructs a single Bˇzier curve.
static BezCurve makeCurve(PApplet parent, float ax1, float ay1, float cx1, float cy1, float cx2, float cy2, float ax2, float ay2)
          Constructs a single Bˇzier curve.
 
Methods inherited from class net.paulhertz.aifile.BezShape
accept, accept, add, add, append, append, append, asPolygon, asPolygon, asPolygon, asPolygon, bezCircle, bezCurve, bezCurveShape, bezEllipse, bezLine, bezMultiCurve, bezMultiLine, bezPoly, bezRectangle, bezRegularPoly, bezTriangle, bezTriangle, bezType, bounds, bounds, boundsRect, calculateCenter, centerVertex, children, clone, containsPoint, containsPoint, curveIterator, curves, curvesCopy, draw, draw, drawQuick, fillColor, fillOpacity, get, getAnchorCenter, getBoundsCenter, getCoords, getCtm, getGeoCenter, getMatrix, hasFill, hasStroke, isClosed, isTerminal, iterator, moveTo, polySize, polySize, polySteps, remove, rotateShape, rotateShape, scaleShape, scaleShape, scaleShape, scaleShape, setBezType, setCenter, setCenter, setCenter, setColors, setCtm, setCtm, setCtm, setCurves, setFillColor, setFillOpacity, setHasFill, setHasStroke, setIsClosed, setNoFill, setNoStroke, setPolySteps, setStartPoint, setStartPoint, setStartPoint, setStrokeColor, setStrokeOpacity, setUseTransparency, setWeight, setX, setY, startVertex, startVertexArray, strokeColor, strokeOpacity, transform, transform, transformShape, translateShape, useTransparency, weight, write, write, x, xcoords, xcoords, xctr, y, ycoords, ycoords, yctr
 
Methods inherited from class net.paulhertz.aifile.DisplayComponent
hide, id, isLocked, isVisible, parentComponent, setLocked, setParentComponent, setVisible, show
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeCurve

public static BezCurve makeCurve(PApplet parent,
                                 float ax1,
                                 float ay1,
                                 float cx1,
                                 float cy1,
                                 float cx2,
                                 float cy2,
                                 float ax2,
                                 float ay2)
Constructs a single Bˇzier curve. Fill, stroke, and weight are set from their values in the Processing environment. The curve is initially open (isClosed == false).

Parameters:
parent - reference to the host PApplet, used for calls to Processing environment
ax1 - x-coordinate of initial anchor point
ay1 - y-coordinate of initial anchor point
cx1 - x-coordinate of first control point
cy1 - y-coordinate of first control point
cx2 - x-coordinate of second control point
cy2 - y-coordinate of second control point
ax2 - x-coordinate of terminal anchor point
ay2 - y-coordinate of terminal anchor point
Returns:
a curved line BezShape of type BezShape.BEZ_CURVE

makeCurve

public static BezCurve makeCurve(float ax1,
                                 float ay1,
                                 float cx1,
                                 float cy1,
                                 float cx2,
                                 float cy2,
                                 float ax2,
                                 float ay2)
Constructs a single Bˇzier curve. Fill, stroke, and weight are set from their values in the Processing environment. The curve is initially open (isClosed == false). PApplet used for calls to the Processing environment is obtained from IgnoCodeLib, which must be correctly initialized in setup. If IgnoCodeLib does not have a reference to a PApplet, it throws a NullPointerException.

Parameters:
ax1 - x-coordinate of initial anchor point
ay1 - y-coordinate of initial anchor point
cx1 - x-coordinate of first control point
cy1 - y-coordinate of first control point
cx2 - x-coordinate of second control point
cy2 - y-coordinate of second control point
ax2 - x-coordinate of terminal anchor point
ay2 - y-coordinate of terminal anchor point
Returns:
a curved line BezShape of type BezShape.BEZ_CURVE


Processing library IgnoCodeLib by Paul Hertz. (C) 2013