net.paulhertz.aifile
Class BezLine

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

public class BezLine
extends BezShape

Provides factory methods to construct and operate on a straight line.


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
 float angle()
           
 float distance()
           
 float[] getCoords()
          Returns an array of all vertex coordinates.
static BezLine makeCoordinates(float x1, float y1, float x2, float y2)
           
static BezLine makeCoordinates(PApplet parent, float x1, float y1, float x2, float y2)
           
static BezLine makePointAngleDistance(float x1, float y1, float angle, float distance)
           
static BezLine makePointAngleDistance(PApplet parent, float x1, float y1, float angle, float distance)
           
 
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, 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

makeCoordinates

public static BezLine makeCoordinates(PApplet parent,
                                      float x1,
                                      float y1,
                                      float x2,
                                      float y2)

makeCoordinates

public static BezLine makeCoordinates(float x1,
                                      float y1,
                                      float x2,
                                      float y2)

makePointAngleDistance

public static BezLine makePointAngleDistance(PApplet parent,
                                             float x1,
                                             float y1,
                                             float angle,
                                             float distance)

makePointAngleDistance

public static BezLine makePointAngleDistance(float x1,
                                             float y1,
                                             float angle,
                                             float distance)

getCoords

public float[] getCoords()
Description copied from class: BezShape
Returns an array of all vertex coordinates. A LineVertex adds two values to the array and a BezVertex adds six values (two control points and an anchor point). There is no inherent way to distinguish which values represent control points and which represent anchor points.

Overrides:
getCoords in class BezShape
Returns:
an array of float generated from the vertices of this shape.
See Also:
BezShape.asPolygon(PApplet, int).

angle

public float angle()

distance

public float distance()


Processing library IgnoCodeLib by Paul Hertz. (C) 2013