/**
* workout colorspace
**/
PdfObject ColorSpace=Shading.getDictionary(PdfDictionary.ColorSpace);
GenericColorSpace newColorSpace= ColorspaceFactory.getColorSpaceInstance(currentPdfFile, ColorSpace, shadingColorspacesObjects);
newColorSpace.setPrinting(isPrinting);
/**setup shading object*/
@SuppressWarnings("UnusedAssignment") PdfPaint shading=null;
if(shading!=null){
/**
* shade the current clip
*/
gs.setFillType(GraphicsState.FILL);
gs.setNonstrokeColor(shading);
//track colorspace use
cache.put(PdfObjectCache.ColorspacesUsed, newColorSpace.getID(),"x");
current.drawShape(shadeShape,gs, Cmd.F) ;
}
}catch(Exception e){
}