code: public void setKnotPosition(int n, int x) {
  		xKnots[n] = ImageMath.clamp(x, 0, 255);
  		sortKnots();
  		rebuildGradient();
  	}
docs: Set a knot position.
  @param n the knot index
  @param x the knot position
  @see #setKnotPosition