code: public void setKnots(int[] x, int[] y, byte[] types, int offset, int count) {
  		numKnots = count;
  		xKnots = new int[numKnots];
  		yKnots = new int[numKnots];
  		knotTypes = new byte[numKnots];
  		System.arraycopy(x, offset, xKnots, 0, numKnots);
  		System.arraycopy(y, offset, yKnots, 0, numKnots);
  		System.arraycopy(types, offset, knotTypes, 0, numKnots);
  		sortKnots();
  		rebuildGradient();
  	}
docs: Set the values of a set of knots.
  @param x the knot positions
  @param y the knot colors
  @param types the knot types
  @param offset the first knot to set
  @param count the number of knots