com.github.cage.image
Class Rippler.AxisConfig

java.lang.Object
  extended by com.github.cage.image.Rippler.AxisConfig
Enclosing class:
Rippler

public static class Rippler.AxisConfig
extends Object

Class to respresent wave tranforming information for an axis.


Constructor Summary
Rippler.AxisConfig(double start, double length, double amplitude)
          Constructor.
 
Method Summary
 double getAmplitude()
           
 double getLength()
           
 double getStart()
           
protected  double normalize(double a, int multi)
          Normalizes parameter to fall into [0, multi * Math.PI].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rippler.AxisConfig

public Rippler.AxisConfig(double start,
                          double length,
                          double amplitude)
Constructor.

Parameters:
start - the starting x offset to generate wave values. Should be between 0 and 2 * Math.PI.
length - the length of x to be used to generate wave values. Should be between 0 and 4 * Math.PI.
amplitude - the maximum y value, if it is too big, some important parts of the image (like the text) can "wave" out on the top or on the bottom of the image.
Method Detail

normalize

protected double normalize(double a,
                           int multi)
Normalizes parameter to fall into [0, multi * Math.PI].

Parameters:
a - to be normalized
multi - multiplicator used for end value
Returns:
normalized value

getStart

public double getStart()
Returns:
wave part start value

getLength

public double getLength()
Returns:
wave part length

getAmplitude

public double getAmplitude()
Returns:
amplitude used to transform the wave part


Copyright © 2011. All Rights Reserved.