patternSpace.getUnderlyingColorSpace(), color, xform);
}
}
else
{
PDShadingPattern shadingPattern = (PDShadingPattern)pattern;
PDShading shading = shadingPattern.getShading();
if (shading == null)
{
LOG.error("shadingPattern is null, will be filled with transparency");
return new Color(0,0,0,0);
}
// fixme: shading needs to use the correct matrix
Matrix patternMatrix = shadingPattern.getMatrix();
if (patternMatrix == null)
{
patternMatrix = new Matrix();
}
return shading.toPaint(patternMatrix);