*
* @param col the java.awt.Color object for which to create a PDFColor object
*/
public PDFColor(java.awt.Color col) {
ColorSpace cs = col.getColorSpace();
ColorExt ce = null;
if (col instanceof ColorExt) {
ce = (ColorExt)col;
cs = ce.getOrigColorSpace();
}
if (cs != null && cs instanceof DeviceCMYKColorSpace) {
// CMYK case
this.colorSpace = new PDFDeviceColorSpace(PDFDeviceColorSpace.DEVICE_CMYK);
float[] cmyk = (ce == null
? col.getColorComponents(null)
: ce.getOriginalColorComponents());
this.cyan = cmyk[0];
this.magenta = cmyk[1];
this.yellow = cmyk[2];
this.black = cmyk[3];
} else if (ce != null) {