// Create a TurbulencePatternGenerator that will do the job
// <!> FIX ME. The tile is not propagated properly to the turbulence op
// <!> FIX ME. SHOULD OPTIMIZE THE CHANNELS REQUIRED FROM THE
// FILTER. THIS COULD BE ADDED TO THE RENDER CONTEXT.
TurbulencePatternGenerator turbGenerator
= new TurbulencePatternGenerator
(baseFreqX, baseFreqY, numOctaves,
seed, stitched, fractalNoise,
(Rectangle2D)region.clone(),
new boolean[]{true, true, true, true});
AffineTransform patternTxf = new AffineTransform();
try{
patternTxf = usr2dev.createInverse();
}catch(NoninvertibleTransformException e){
}
turbGenerator.generatePattern(twr, patternTxf);
// Wrap raster in buffered image
BufferedImage bi = new BufferedImage(cm, wr,
cm.isAlphaPremultiplied(),
null);