Beispiel #1
0
 /**
  * Copy one Gradient into another.
  *
  * @param g the Gradient to copy into
  */
 public void copyTo(Gradient g) {
   g.numKnots = numKnots;
   g.map = map.clone();
   g.xKnots = xKnots.clone();
   g.yKnots = yKnots.clone();
   g.knotTypes = knotTypes.clone();
 }
Beispiel #2
0
 @Override
 public Object clone() {
   Gradient g = (Gradient) super.clone();
   g.map = map.clone();
   g.xKnots = xKnots.clone();
   g.yKnots = yKnots.clone();
   g.knotTypes = knotTypes.clone();
   return g;
 }
Beispiel #3
0
 /**
  * Build a random gradient.
  *
  * @return the new Gradient
  */
 public static Gradient randomGradient() {
   Gradient g = new Gradient();
   g.randomize();
   return g;
 }