|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttipgame.util.PathBlur
public class PathBlur
Draws in reduced colors.
| Constructor Summary | |
|---|---|
PathBlur()
|
|
| Method Summary | |
|---|---|
private static java.awt.Color |
blend(java.awt.Color from,
java.awt.Color to,
double distance)
blends two color as a linear combination |
private static double[] |
getExponentialValues(int num,
double base)
gets exponentially increasing values from 0 to 1 |
private static double[] |
getLinearValues(int num)
gets linearly increasing values from 0 to 1 |
static void |
paintBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history,
double[] values)
paints shapes at a given intensity |
private static void |
paintBlur(java.awt.Graphics2D graphics,
java.awt.Shape current,
java.awt.geom.Point2D.Double movement,
double[] values)
fills a blur from where the shape used to be to its current location by translating -movement and drawing successively less transparent shapes while translating back to the original location. |
static void |
paintExponentialBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history,
double base)
paints shapes in an exponentially decreasing intensity |
static void |
paintExponentialBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history,
int steps,
double base)
paints shapes at exponentially decreasing intensity |
static void |
paintExponentialBlur(java.awt.Graphics2D graphics,
java.awt.Shape current,
java.awt.geom.Point2D.Double movement,
int steps,
double base)
paints shapes in an exponentially decreasing intensity |
static void |
paintLinearBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history)
paints shapes in an linearly decreasing intensity |
static void |
paintLinearBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history,
int steps)
paints shapes at linearly decreasing intensity |
static void |
paintLinearBlur(java.awt.Graphics2D graphics,
java.awt.Shape current,
java.awt.geom.Point2D.Double movement,
int steps)
paints shapes in a linearly decreasing intensity |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PathBlur()
| Method Detail |
|---|
private static void paintBlur(java.awt.Graphics2D graphics,
java.awt.Shape current,
java.awt.geom.Point2D.Double movement,
double[] values)
graphics - the graphics used for drawingcurrent - the current location of the shapemovement - the destination of the shapevalues - the intensity values for drawing the shape
public static void paintLinearBlur(java.awt.Graphics2D graphics,
java.awt.Shape current,
java.awt.geom.Point2D.Double movement,
int steps)
graphics - the graphics used for drawingcurrent - the current location of the shapemovement - the destination of the shapesteps - how many steps to draw
public static void paintExponentialBlur(java.awt.Graphics2D graphics,
java.awt.Shape current,
java.awt.geom.Point2D.Double movement,
int steps,
double base)
graphics - the graphics used for drawingcurrent - the current location of the shapemovement - the destination of the shapesteps - how many steps to drawbase - the base to exponentiate, should be less than 1private static double[] getLinearValues(int num)
num - the steps for increasing
private static double[] getExponentialValues(int num,
double base)
num - the steps for increasingbase - the base for exponentiating
public static void paintExponentialBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history,
double base)
graphics - the graphics used for drawinghistory - the shapes to drawbase - the base to exponentiate, should be less than 1
public static void paintLinearBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history)
graphics - the graphics used for drawinghistory - the shapes to drawbase - the base to exponentiate, should be less than 1
public static void paintBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history,
double[] values)
graphics - the graphics used for drawinghistory - the shapes to drawvalues - the intensities corresponding to the shapes
public static void paintLinearBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history,
int steps)
graphics - the graphics used for drawinghistory - the shapes to drawsteps - the number of steps for changing the intensity
public static void paintExponentialBlur(java.awt.Graphics2D graphics,
java.awt.Shape[] history,
int steps,
double base)
graphics - the graphics used for drawinghistory - the shapes to drawsteps - the number of steps for changing the intensitybase - the base to exponentiate for the densities
private static java.awt.Color blend(java.awt.Color from,
java.awt.Color to,
double distance)
from - the first colorto - the second colordistance - the amount of the second color between
zero and one. One is all the second color and zero is
none of the second color
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||