PDFColor color2 = new PDFColor(c2.getRed(), c2.getGreen(), c2.getBlue());
someColors.addElement(color2);
PDFFunction myfunc = this.pdfDoc.makeFunction(2, theDomain, null, color1.getVector(), color2.getVector(), 1.0);
ColorSpace aColorSpace = new ColorSpace(ColorSpace.DEVICE_RGB);
PDFPattern myPat = this.pdfDoc.createGradient(false, aColorSpace,
someColors, null, theCoords);
currentStream.write(myPat.getColorSpaceOut(fill));
} else if(paint instanceof TexturePaint) {