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
{