Пример #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();
 }
Пример #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;
 }
Пример #3
0
 /**
  * Build a random gradient.
  *
  * @return the new Gradient
  */
 public static Gradient randomGradient() {
   Gradient g = new Gradient();
   g.randomize();
   return g;
 }