float[] rgb = colorSpace.toRGB(color.getComponents());
return new Color(rgb[0], rgb[1], rgb[2]);
}
else
{
PDPattern patternSpace = (PDPattern)colorSpace;
PDAbstractPattern pattern = patternSpace.getPattern(color);
if (pattern instanceof PDTilingPattern)
{
PDTilingPattern tilingPattern = (PDTilingPattern) pattern;
if (tilingPattern.getPaintType() == PDTilingPattern.PAINT_COLORED)
{
// colored tiling pattern
return new TilingPaint(this, tilingPattern, xform);
}
else
{
// uncolored tiling pattern
return new TilingPaint(this, tilingPattern,
patternSpace.getUnderlyingColorSpace(), color, xform);
}
}
else
{
PDShadingPattern shadingPattern = (PDShadingPattern)pattern;