code: public void splitSpan(int n) {
  		int x = (xKnots[n] + xKnots[n+1])/2;
  		addKnot(x, getColor(x/256.0f), knotTypes[n]);
  		rebuildGradient();
  	}
docs: Split a span into two by adding a knot in the middle.
  @param n the span index