Class PACurveMaker
PACurveMaker is a utility and storage class for interactive drawing and curve modeling and for drawing to on screen PApplets or off screen PGraphics. You can use it for data storage in interactive drawing applications, or implement your own storage with just the features you require. PACUrveMaker makes extensive use of PACurveUtility's static methods and provides a wide range of graphic objects and properties for dense point arrays, reduced point arrays, derived Bezier curves (weighted and not weighted), brushstroke Bezier shapes, brushstroke polygons, plus some basic timing data associated with drawing to the screen. You can use PACurveUtility for drawing all PACurveMaker data formats or you can use the built-in commands if you use PACurveMaker as a storage class.
PACurveMaker's factory methods takes as their principal argument an array of PVectors.
The array is typically derived from a line drawn by dragging the mouse across the application
window. This line is stored in dragPoints. When reducePoints() or calculateDerivedPoints()
is called, dragPoints is reduced using the RDP algorithm and the result is stored in
rdpPoints. CalculateDerivedPoints() passes the reduced points to PACurveUtility.calculateCurve()
to create a Bezier path, curveShape, using PixelAudio library's PABezShape class. Finally, a
brushstroke shape, brushShape, is created from the curve. An array of PVectors,
eventPoints, is created from curveShape to facilitate timed event-staging along the curve.
Another array of Pvectors, brushPoly, can be used to test points with PABezShape.pointInPoly().
The values of all other fields are up to the caller. In particular, you may want to set timeStamp,
timeOffset, and the dragTimes array, if the timing of drawing events is of interest.
PACurveMaker works in stages. If you call any one of the buildCurveMakerComplete()
factory methods, PACurveMaker will call calculateDerivedPoints() to create the objects
listed in the previous paragraph for you. Otherwise, when you call the buildCurveMaker() factory methods,
you will have the opportunity to set drawing properties and other fields yourself and then call calculateDerivedPoints().
After a call to calculateDerivedPoints(), isReady() will return true. You can also
use lazy initialization to create PACurveMaker geometry as you need it. The fields for the various point
and curve data objects are private: when you call a getter method such as getCurveShape(), it will
create the curveShape if it has not yet been initialized. The same is true of rdpPoints, brushShape, eventPoints,
curveShape and brushPoly.
Each of the geometric data objects--dragPoints, rdpPoints, curveShape, and brushShape--has method for drawing to the screen in a PApplet or drawing offscreen in a PGraphic. DragPoints and rdpPoints keep their drawing parameters (fill, stroke, weight) in PACurveMaker variables. PABezShapes like curveShape and brushShape can store drawing parameters internally.
There a several properties of PACurveMaker that can affect the appearance of curves. The value of epsilon
determines how closely the reduced point set in rdpPoints matches the dense point set in dragPoints.
Smaller values, down to 1.0, yield a reduced point set with more points and great precision. Some of the factory methods
allow you to supply your own value for epsilon, which defaults to 8.0. Weighted curves and brushstrokes are variations
on the smooth Bezier curves that PACurveMaker generates by default. In the default curves, the rate of change in
curvature is the same on either side of a Bezier anchor point. The weighted curves use a value, bezierBias, to
change the adjust the control points. The default bias value, PABezShape.LAMBDA, may provide a closer approximation
to rdpPoints. Other values can create extreme curves. It's worth some experimentation. If you call setDrawWeighted(true)
and then call calculateDerivedPoints(), curveShape and brushShape will be generated as weighted Bezier curves.
There are several calls to generate weighted Bezier curves. They do not set local variables, but can be useful
for exploring the variations created by different values of bezierBias. PACurveUtility can also create
weighted curves.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintColor for highlighted brush stroke, stored in brushShapefloatA weight applied to calculations of the control points for Bezier curvesintColor for simulated brushstroke fill and stroke, stored in brushShapeprivate ArrayList<processing.core.PVector>polygon representation of brushShape, for point testing, etc.private PABezShapeA simulated brush strokefloatThe distance in pixels of the edges of the brush stroke from the central generating curvefloatweight of stroke for brushStroke, set to 0 for no strokeintColor for Bezier curve derived from drawPoints, stored in bezPoints or weightedBezPointsprivate PABezShapeAn ArrayList of PABezShapes representing a continuous curved linefloatweight of curved line curveShapeintColor for lines dragged by the mouse, stored in allPointsArrayList<processing.core.PVector>List of all the points that need to be reducedList of time data: first element is time in millis when event occurred, the remaining elements are offsets in millis from the first elementfloatweight of lines drawn between PVectors in allPointsfloatA parameter to control the amount of reduction in the RDP algorithmprivate ArrayList<processing.core.PVector>List of points where events such as audio samples can be triggeredintcolor of eventPoints markersfloatsize of eventPoints markersintnumber of steps along a polygonized curve, used to produce eventPoints from curveShapebooleanboolean value that determines whether curve and brush shapes are weightedprivate booleanFlag to indicate that allPoints, drawPoints, bezPoints, and brushShape have been initializedintnumber of steps along a polygonized curve, used to produce brushPolyintColor for points reduced by RDP algorithm, stored in drawPointslist of indices of points in dragPoints captured for rdpPointsprivate ArrayList<processing.core.PVector>The reduced points delivered by the RDP algorithmfloatweight of lines drawn between PVectors in drawPointsintTime of mouseReleased event, in milliseconds elapsed since timeStampintTime when CurveMaker instance was initialized by mousePressed event, in milliseconds since application startup -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePACurveMaker(ArrayList<processing.core.PVector> points) Constructor called by all factory methods, initializes dragPoints, rdpPoints and rdpIndices. -
Method Summary
Modifier and TypeMethodDescriptionvoidbrushDraw(processing.core.PApplet parent) Draws the stored brushShape to a PApplet using local properties this.brushColor, this.brushColor, this.brushWeight.voidbrushDraw(processing.core.PApplet parent, int brushColor, int strokeColor, float brushWeight) Draws the stored brushShape to a PApplet using supplied fill color, stroke color, and weight.voidbrushDraw(processing.core.PGraphics pg) Draws the stored brushShape to an offscreen PGraphics using local properties this.brushColor, this.brushColor, this.brushWeight.voidbrushDraw(processing.core.PGraphics pg, int brushColor, int strokeColor, float brushWeight) Draws the stored brushShape to an offscreen PGraphics using supplied fill color, stroke color, and weight.voidbrushDrawDirect(processing.core.PApplet parent) Draws the stored brush shape to a PApplet using its properties as a PABezShape.voidbrushDrawDirect(processing.core.PGraphics pg) Draws the stored brush shape to an offscreen PGraphics using its properties as a PABezShape.static PACurveMakerbuildCurveMaker(ArrayList<processing.core.PVector> points) Creates a PACurveMaker from supplied points, caller must complete construction with a call to calculateDerivedPoints() to generate rdpPoints and other instance variables.static PACurveMakerbuildCurveMaker(ArrayList<processing.core.PVector> points, float epsilon) static PACurveMakerbuildCurveMaker(ArrayList<processing.core.PVector> points, float epsilon, int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor) Creates a PACurveMaker from supplied points, caller must complete construction with a call to calculateDerivedPoints() to generate rdpPoints and other instance variables.static PACurveMakerbuildCurveMakerComplete(ArrayList<processing.core.PVector> points) Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.static PACurveMakerbuildCurveMakerComplete(ArrayList<processing.core.PVector> points, float epsilon) Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.static PACurveMakerbuildCurveMakerComplete(ArrayList<processing.core.PVector> points, float epsilon, int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor) Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.voidCalculates rdpPoints, curveShape, eventPoints, brushShape and brushPoly.voidcurveDraw(processing.core.PApplet parent) Draws a Bezier curve using the 2D Bezier curve data in this.curveShape and the current values of this.curveColor and this.curveWeight.voidcurveDraw(processing.core.PGraphics pg) Draws a Bezier curve using the 2D Bezier curve data in this.curveShape and the current values of this.curveColor and this.curveWeight.voidcurveDrawDirect(processing.core.PApplet parent) Draws a Bezier curve using local drawing properties of curveShape.voidcurveDrawDirect(processing.core.PGraphics pg) Draws a Bezier curve using local drawing properties of this.curveShape as a PABezShape.voiddragPointsDraw(processing.core.PApplet parent) Draws a line using the PVector data in allPoints and the current values of this.dragColor and this.dragWeight.voiddragPointsDraw(processing.core.PApplet parent, int dragColor, float dragWeight) Draws a line using the PVector data in dragPoints and a supplied color.voiddragPointsDraw(processing.core.PGraphics pg) Draws dragPoints to a PGraphics using local color and weight, this.dragColor and this.dragWeight.voiddragPointsDraw(processing.core.PGraphics pg, int dragColor, float dragWeight) Draws dragPoints to a PGraphics using supplied color and weight.voideventPointsDraw(processing.core.PApplet parent) Draws this.eventPoints to a PApplet as circles using local properties this.eventPointsColor and this.eventPointsSize.voideventPointsDraw(processing.core.PApplet parent, int eventPointsColor, float eventPointsSize) Draws this.eventPoints to a PApplet as circles using supplied properties eventPointsColor and eventPointsSize.voideventPointsDraw(processing.core.PApplet parent, int eventSteps, int eventPointsColor, float eventPointsSize) Draws this.eventPoints to a PApplet as circles using supplied properties eventPointsSteps, eventPointsColor and eventPointsSize.voideventPointsDraw(processing.core.PGraphics pg) Draws this.eventPoints to an offscreen PGraphics as circles using local properties this.eventPointsColor and this.eventPointsSize.voideventPointsDraw(processing.core.PGraphics pg, int eventPointsColor, float eventPointsSize) Draws this.eventPoints to an offscreen PGraphics as circles using supplied properties eventPointsColor and eventPointsSize.voideventPointsDraw(processing.core.PGraphics pg, int eventSteps, int eventPointsColor, float eventPointsSize) Draws this.eventPoints to an offscreen PGraphics as circles using supplied properties eventPointsSteps, eventPointsColor and eventPointsSize.intfloatintArrayList<processing.core.PVector>floatfloatintfloatintArrayList<processing.core.PVector>int[]floatfloatArrayList<processing.core.PVector>ArrayList<processing.core.PVector>getEventPoints(int eventSteps) intfloatintintintint[]ArrayList<processing.core.PVector>floatintintgetWeightedBrushShape(float brushSize, float bias) getWeightedCurveShape(float bias) Calculates a PABezSHape with distances between control points and anchor points adjusted by bezierBias.booleanbooleanisReady()voidreducedPointsDraw(processing.core.PApplet parent) Draws a line using the PVector data in rdpPoints and the current values of this.rdpColor and this.rdpWeight.voidreducedPointsDraw(processing.core.PApplet parent, int rdpColor, float drawWeight) Draws a line using the PVector data in drawPoints, the reduced point set derived from allPoints.voidreducedPointsDraw(processing.core.PGraphics pg) Draws drawPoints to a PGraphics using current values of this.rdpColor and this.rdpWeight.voidreducedPointsDraw(processing.core.PGraphics pg, int rdpColor, float rdpWeight) Draws rdpPoints to a PGraphics using supplied color and weight.voidreducePoints(float epsilon) Takes the list of points in allPoints and generates a reduced list in drawPoints.voidsetActiveBrushColor(int activeBrushColor) voidsetBezierBias(float bias) voidsetBrushColor(int brushColor) voidsetBrushShape(PABezShape brushShape) voidsetBrushSize(float brushSize) voidsetBrushWeight(float brushWeight) voidsetCurveColor(int curveColor) voidsetCurveShape(PABezShape curveShape) voidsetCurveWeight(float curveWeight) voidsetDragColor(int dragColor) voidsetDragPoints(ArrayList<processing.core.PVector> dragPoints) If you change the value of dragPoints, immediately call calculateDerivedPoints() to refresh all drawing objects.voidsetDragTimes(ArrayList<Integer> dragTimes) voidsetDragWeight(float dragWeight) voidsetDrawingProperties(int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor) Sets various properties used for drawing PACurveMaker graphics.voidsetDrawWeighted(boolean isDrawWeighted) voidsetEpsilon(float epsilon) voidsetEventPoints(ArrayList<processing.core.PVector> eventPoints) voidsetEventPointsColor(int eventPointsColor) voidsetEventPointsSize(float eventPointsSize) voidsetEventSteps(int eventSteps) voidsetPolySteps(int polySteps) voidsetRdpColor(int rdpColor) voidsetRdpIndices(ArrayList<Integer> rdpIndices) Sets rdpIndices, generally not something you want to do.voidsetRdpPoints(ArrayList<processing.core.PVector> rdpPoints) Sets rdpPoints, generally not something you want to do: let reducePoints() or calculateDerivedPoints() derive rdpPoints from dragPoints instead.voidsetRdpWeight(float rdpWeight) voidsetTimeOffset(int timeOffset) voidsetTimeStamp(int timeStamp)
-
Field Details
-
dragPoints
List of all the points that need to be reduced -
rdpPoints
The reduced points delivered by the RDP algorithm -
rdpIndices
list of indices of points in dragPoints captured for rdpPoints -
curveShape
An ArrayList of PABezShapes representing a continuous curved line -
brushShape
A simulated brush stroke -
brushPoly
polygon representation of brushShape, for point testing, etc. -
polySteps
public int polyStepsnumber of steps along a polygonized curve, used to produce brushPoly -
brushSize
public float brushSizeThe distance in pixels of the edges of the brush stroke from the central generating curve -
epsilon
public float epsilonA parameter to control the amount of reduction in the RDP algorithm -
isDrawWeighted
public boolean isDrawWeightedboolean value that determines whether curve and brush shapes are weighted -
bezierBias
public float bezierBiasA weight applied to calculations of the control points for Bezier curves -
dragColor
public int dragColorColor for lines dragged by the mouse, stored in allPoints -
dragWeight
public float dragWeightweight of lines drawn between PVectors in allPoints -
rdpColor
public int rdpColorColor for points reduced by RDP algorithm, stored in drawPoints -
rdpWeight
public float rdpWeightweight of lines drawn between PVectors in drawPoints -
curveColor
public int curveColorColor for Bezier curve derived from drawPoints, stored in bezPoints or weightedBezPoints -
curveWeight
public float curveWeightweight of curved line curveShape -
brushColor
public int brushColorColor for simulated brushstroke fill and stroke, stored in brushShape -
activeBrushColor
public int activeBrushColorColor for highlighted brush stroke, stored in brushShape -
brushWeight
public float brushWeightweight of stroke for brushStroke, set to 0 for no stroke -
eventPoints
List of points where events such as audio samples can be triggered -
eventSteps
public int eventStepsnumber of steps along a polygonized curve, used to produce eventPoints from curveShape -
eventPointsColor
public int eventPointsColorcolor of eventPoints markers -
eventPointsSize
public float eventPointsSizesize of eventPoints markers -
isReady
private boolean isReadyFlag to indicate that allPoints, drawPoints, bezPoints, and brushShape have been initialized -
timeStamp
public int timeStampTime when CurveMaker instance was initialized by mousePressed event, in milliseconds since application startup -
timeOffset
public int timeOffsetTime of mouseReleased event, in milliseconds elapsed since timeStamp -
dragTimes
List of time data: first element is time in millis when event occurred, the remaining elements are offsets in millis from the first element
-
-
Constructor Details
-
PACurveMaker
Constructor called by all factory methods, initializes dragPoints, rdpPoints and rdpIndices.- Parameters:
points- the array of points to be reduced, stored in dragPoints
-
-
Method Details
-
setDrawingProperties
public void setDrawingProperties(int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor) Sets various properties used for drawing PACurveMaker graphics.- Parameters:
dragColor-dragWeight-rdpColor-rdpWeight-curveColor-curveWeight-brushColor-brushWeight-activeBrushColor-
-
buildCurveMaker
Creates a PACurveMaker from supplied points, caller must complete construction with a call to calculateDerivedPoints() to generate rdpPoints and other instance variables.- Parameters:
points- a dense point set- Returns:
- a partially initialized PACurveMaker instance, requires a later call to calculateDeriverPoints()
-
buildCurveMaker
public static PACurveMaker buildCurveMaker(ArrayList<processing.core.PVector> points, float epsilon) - Parameters:
points- a dense point setepsilon- controls amount of thinning of 0points to derive rdpPoints- Returns:
- a partially initialized PACurveMaker instance, requires a later call to calculateDeriverPoints()
-
buildCurveMaker
public static PACurveMaker buildCurveMaker(ArrayList<processing.core.PVector> points, float epsilon, int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor) Creates a PACurveMaker from supplied points, caller must complete construction with a call to calculateDerivedPoints() to generate rdpPoints and other instance variables. Sets various properties used for drawing PACurveMaker graphics.- Parameters:
points- a dense point setepsilon- controls amount of thinning of points to derive rdpPointsdragColor-dragWeight-rdpColor-rdpWeight-curveColor-curveWeight-brushColor-brushWeight-activeBrushColor-- Returns:
- a partially initialized PACurveMaker instance, requires a later call to calculateDeriverPoints()
-
buildCurveMakerComplete
Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.- Parameters:
points- a dense point set- Returns:
- a fully initialized PACurveMaker instance
-
buildCurveMakerComplete
public static PACurveMaker buildCurveMakerComplete(ArrayList<processing.core.PVector> points, float epsilon) Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.- Parameters:
points- a dense point setepsilon- controls amount of thinning of points to derive rdpPoints- Returns:
- a fully initialized PACurveMaker instance
-
buildCurveMakerComplete
public static PACurveMaker buildCurveMakerComplete(ArrayList<processing.core.PVector> points, float epsilon, int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor) Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true. Sets various properties used for drawing PACurveMaker graphics.- Parameters:
points- a dense point setepsilon- controls amount of thinning of points to derive rdpPointsdragColor-dragWeight-rdpColor-rdpWeight-curveColor-curveWeight-brushColor-brushWeight-activeBrushColor-- Returns:
- a fully initialized PACurveMaker instance
-
reducePoints
public void reducePoints(float epsilon) Takes the list of points in allPoints and generates a reduced list in drawPoints.- Parameters:
epsilon- controls amount of thinning applied to dragPoints to derive rdpPoints
-
calculateDerivedPoints
public void calculateDerivedPoints()Calculates rdpPoints, curveShape, eventPoints, brushShape and brushPoly. Sets isReady to true on completion. If you change epsilon, polySteps, eventSteps or isUseWeighted, call calculateDerivedPoints to refresh the drawing objects. -
isReady
public boolean isReady() -
isDrawWeighted
public boolean isDrawWeighted() -
setDrawWeighted
public void setDrawWeighted(boolean isDrawWeighted) -
getBrushSize
public float getBrushSize() -
setBrushSize
public void setBrushSize(float brushSize) -
getEpsilon
public float getEpsilon() -
setEpsilon
public void setEpsilon(float epsilon) -
getBezierBias
public float getBezierBias() -
setBezierBias
public void setBezierBias(float bias) -
getDragPoints
-
setDragPoints
If you change the value of dragPoints, immediately call calculateDerivedPoints() to refresh all drawing objects.- Parameters:
dragPoints- ArrayList, a dense set of points for drawing a line
-
getDragColor
public int getDragColor() -
setDragColor
public void setDragColor(int dragColor) -
getDragWeight
public float getDragWeight() -
setDragWeight
public void setDragWeight(float dragWeight) -
getRdpPoints
-
setRdpPoints
Sets rdpPoints, generally not something you want to do: let reducePoints() or calculateDerivedPoints() derive rdpPoints from dragPoints instead.- Parameters:
rdpPoints-
-
getRdpIndices
-
getRdpIndicesAsInts
public int[] getRdpIndicesAsInts() -
setRdpIndices
Sets rdpIndices, generally not something you want to do. Call reducePoints() or calculateDerivedPoints instead and stay out of trouble.- Parameters:
rdpIndices-
-
getRdpColor
public int getRdpColor() -
setRdpColor
public void setRdpColor(int rdpColor) -
getRdpWeight
public float getRdpWeight() -
setRdpWeight
public void setRdpWeight(float rdpWeight) -
getCurveShape
-
getWeightedCurveShape
Calculates a PABezSHape with distances between control points and anchor points adjusted by bezierBias. Does not store the returned curve.- Parameters:
bias- a parameter to adjust distances between Bezier anchor points and control points.- Returns:
- a Bezier curve shape whose control points are adjusted using bezierBias.
-
getWeightedCurveShape
-
setCurveShape
-
getCurveColor
public int getCurveColor() -
setCurveColor
public void setCurveColor(int curveColor) -
getCurveWeight
public float getCurveWeight() -
setCurveWeight
public void setCurveWeight(float curveWeight) -
getBrushShape
-
getWeightedBrushShape
-
getWeightedBrushShape
-
setBrushShape
-
getBrushColor
public int getBrushColor() -
setBrushColor
public void setBrushColor(int brushColor) -
getBrushWeight
public float getBrushWeight() -
setBrushWeight
public void setBrushWeight(float brushWeight) -
getActiveBrushColor
public int getActiveBrushColor() -
setActiveBrushColor
public void setActiveBrushColor(int activeBrushColor) -
getBrushPoly
-
getPolySteps
public int getPolySteps() -
setPolySteps
public void setPolySteps(int polySteps) -
getEventPoints
-
getEventPoints
-
setEventPoints
-
getEventSteps
public int getEventSteps() -
setEventSteps
public void setEventSteps(int eventSteps) -
getEventPointsColor
public int getEventPointsColor() -
setEventPointsColor
public void setEventPointsColor(int eventPointsColor) -
getEventPointsSize
public float getEventPointsSize() -
setEventPointsSize
public void setEventPointsSize(float eventPointsSize) -
getTimeStamp
public int getTimeStamp() -
setTimeStamp
public void setTimeStamp(int timeStamp) -
getTimeOffset
public int getTimeOffset() -
setTimeOffset
public void setTimeOffset(int timeOffset) -
getDragTimes
-
getDragTimesAsInts
public int[] getDragTimesAsInts() -
setDragTimes
-
dragPointsDraw
public void dragPointsDraw(processing.core.PApplet parent, int dragColor, float dragWeight) Draws a line using the PVector data in dragPoints and a supplied color.- Parameters:
parent- a PApplet where drawing takes placedragColor- color for the line that is drawn
-
dragPointsDraw
public void dragPointsDraw(processing.core.PApplet parent) Draws a line using the PVector data in allPoints and the current values of this.dragColor and this.dragWeight.- Parameters:
parent- a PApplet where drawing takes place
-
reducedPointsDraw
public void reducedPointsDraw(processing.core.PApplet parent, int rdpColor, float drawWeight) Draws a line using the PVector data in drawPoints, the reduced point set derived from allPoints.- Parameters:
parent- a PApplet where drawing takes placerdpColor- the color for the line that is drawndrawWeight- the weight of the line that is drawn
-
reducedPointsDraw
public void reducedPointsDraw(processing.core.PApplet parent) Draws a line using the PVector data in rdpPoints and the current values of this.rdpColor and this.rdpWeight.- Parameters:
parent- a PApplet where drawing takes place
-
dragPointsDraw
public void dragPointsDraw(processing.core.PGraphics pg, int dragColor, float dragWeight) Draws dragPoints to a PGraphics using supplied color and weight.- Parameters:
pg- a PGraphics offscreen graphics contextdragColor- color for the line through the dense point setdragWeight- weight (in pixels) of the line through the dense point set
-
dragPointsDraw
public void dragPointsDraw(processing.core.PGraphics pg) Draws dragPoints to a PGraphics using local color and weight, this.dragColor and this.dragWeight.- Parameters:
pg- a PGraphics offscreen graphics context
-
reducedPointsDraw
public void reducedPointsDraw(processing.core.PGraphics pg, int rdpColor, float rdpWeight) Draws rdpPoints to a PGraphics using supplied color and weight.- Parameters:
pg- a PGraphics offscreen graphics contextrdpColor- color for the line through the reduced point setrdpWeight- weight (in pixels) of the line through the reduced point set
-
reducedPointsDraw
public void reducedPointsDraw(processing.core.PGraphics pg) Draws drawPoints to a PGraphics using current values of this.rdpColor and this.rdpWeight.- Parameters:
pg- a PGraphics offscreen graphics context
-
curveDraw
public void curveDraw(processing.core.PApplet parent) Draws a Bezier curve using the 2D Bezier curve data in this.curveShape and the current values of this.curveColor and this.curveWeight. The resulting curve will have no fill.- Parameters:
parent- a PApplet instance
-
curveDrawDirect
public void curveDrawDirect(processing.core.PApplet parent) Draws a Bezier curve using local drawing properties of curveShape. If the drawing properties use a fill, the resulting curve will have a fill.- Parameters:
parent- a PApplet instance
-
curveDraw
public void curveDraw(processing.core.PGraphics pg) Draws a Bezier curve using the 2D Bezier curve data in this.curveShape and the current values of this.curveColor and this.curveWeight. The resulting curve will have no fill.- Parameters:
pg- a PGraphics offscreen graphics context
-
curveDrawDirect
public void curveDrawDirect(processing.core.PGraphics pg) Draws a Bezier curve using local drawing properties of this.curveShape as a PABezShape. If the drawing properties use a fill, the resulting curve will have a fill.- Parameters:
pg- a PGraphics offscreen graphics context
-
brushDraw
public void brushDraw(processing.core.PApplet parent, int brushColor, int strokeColor, float brushWeight) Draws the stored brushShape to a PApplet using supplied fill color, stroke color, and weight. If brushWeight == 0, there is no stroke.- Parameters:
parent-brushColor-strokeColor-brushWeight-
-
brushDraw
public void brushDraw(processing.core.PApplet parent) Draws the stored brushShape to a PApplet using local properties this.brushColor, this.brushColor, this.brushWeight.- Parameters:
parent-
-
brushDrawDirect
public void brushDrawDirect(processing.core.PApplet parent) Draws the stored brush shape to a PApplet using its properties as a PABezShape.- Parameters:
parent-
-
brushDraw
public void brushDraw(processing.core.PGraphics pg, int brushColor, int strokeColor, float brushWeight) Draws the stored brushShape to an offscreen PGraphics using supplied fill color, stroke color, and weight. If brushWeight == 0, there is no stroke.- Parameters:
parent-brushColor-strokeColor-brushWeight-
-
brushDraw
public void brushDraw(processing.core.PGraphics pg) Draws the stored brushShape to an offscreen PGraphics using local properties this.brushColor, this.brushColor, this.brushWeight.- Parameters:
parent-
-
brushDrawDirect
public void brushDrawDirect(processing.core.PGraphics pg) Draws the stored brush shape to an offscreen PGraphics using its properties as a PABezShape.- Parameters:
parent-
-
eventPointsDraw
public void eventPointsDraw(processing.core.PApplet parent) Draws this.eventPoints to a PApplet as circles using local properties this.eventPointsColor and this.eventPointsSize.- Parameters:
parent-
-
eventPointsDraw
public void eventPointsDraw(processing.core.PApplet parent, int eventPointsColor, float eventPointsSize) Draws this.eventPoints to a PApplet as circles using supplied properties eventPointsColor and eventPointsSize.- Parameters:
parent-eventPointsColor-eventPointsSize-
-
eventPointsDraw
public void eventPointsDraw(processing.core.PApplet parent, int eventSteps, int eventPointsColor, float eventPointsSize) Draws this.eventPoints to a PApplet as circles using supplied properties eventPointsSteps, eventPointsColor and eventPointsSize. EventPointsSteps determines the number of circles. The local value eventPointsSteps is not changed.- Parameters:
parent-eventSteps-eventPointsColor-eventPointsSize-
-
eventPointsDraw
public void eventPointsDraw(processing.core.PGraphics pg) Draws this.eventPoints to an offscreen PGraphics as circles using local properties this.eventPointsColor and this.eventPointsSize.- Parameters:
pg-
-
eventPointsDraw
public void eventPointsDraw(processing.core.PGraphics pg, int eventPointsColor, float eventPointsSize) Draws this.eventPoints to an offscreen PGraphics as circles using supplied properties eventPointsColor and eventPointsSize.- Parameters:
pg-eventPointsColor-eventPointsSize-
-
eventPointsDraw
public void eventPointsDraw(processing.core.PGraphics pg, int eventSteps, int eventPointsColor, float eventPointsSize) Draws this.eventPoints to an offscreen PGraphics as circles using supplied properties eventPointsSteps, eventPointsColor and eventPointsSize. Parameter eventPointsSteps determines the number of circles. The local value eventPointsSteps is not changed.- Parameters:
pg-eventSteps-eventPointsColor-eventPointsSize-
-