public abstract RandomFlameGenerator createRandomFlameGenerator();
public abstract Flame postProcessFlame(Flame pFlame);
protected void addImgVariation(Flame pFlame, XForm pXForm) {
VariationFunc imgFunc = VariationFuncList.getVariationFuncInstance("post_colormap_wf");
pXForm.addVariation(1.0, imgFunc);
ImageData imgData = getRandomImage();
if (imgData != null) {
double size = 1.5 + Math.random() * 5.0;
imgFunc.setParameter(AbstractColorMapWFFunc.PARAM_SCALEX, size);
imgFunc.setParameter(AbstractColorMapWFFunc.PARAM_SCALEY, size);
if (Math.random() < 0.5) {
pXForm.setWeight(2.0 * pXForm.getWeight());
}
if (imgData.getPageUrl() != null) {
imgFunc.setRessource(AbstractColorMapWFFunc.RESSOURCE_IMAGE_DESC_SRC, imgData.getPageUrl().getBytes());
}
imgFunc.setRessource(AbstractColorMapWFFunc.RESSOURCE_INLINED_IMAGE, imgData.getData());
if (imgData.getPageUrl() != null) {
imgFunc.setRessource(AbstractColorMapWFFunc.RESSOURCE_IMAGE_DESC_SRC, imgData.getPageUrl().getBytes());
}
if (imgData.getImgUrl() != null) {
imgFunc.setRessource(AbstractColorMapWFFunc.RESSOURCE_IMAGE_SRC, imgData.getImgUrl().getBytes());
}
if (Math.random() < 0.667) {
pFlame.getFirstLayer().setPalette(imgData.getGradient());
}
}