Search in sources :

Example 86 with Flame

use of org.jwildfire.create.tina.base.Flame in project JWildfire by thargor6.

the class TinaController method distributeColorsBtn_clicked.

public void distributeColorsBtn_clicked() {
    Flame flame = getCurrFlame();
    if (flame != null) {
        saveUndoPoint();
        getCurrLayer().distributeColors();
        transformationChanged(true);
    }
}
Also used : Flame(org.jwildfire.create.tina.base.Flame) RenderedFlame(org.jwildfire.create.tina.render.RenderedFlame)

Example 87 with Flame

use of org.jwildfire.create.tina.base.Flame in project JWildfire by thargor6.

the class TinaController method resetDOFSettings.

public void resetDOFSettings() {
    Flame flame = getCurrFlame();
    if (flame != null) {
        saveUndoPoint();
        flame.resetDOFSettings();
        refreshUI();
    }
}
Also used : Flame(org.jwildfire.create.tina.base.Flame) RenderedFlame(org.jwildfire.create.tina.render.RenderedFlame)

Example 88 with Flame

use of org.jwildfire.create.tina.base.Flame in project JWildfire by thargor6.

the class TinaController method resetBokehSettings.

public void resetBokehSettings() {
    Flame flame = getCurrFlame();
    if (flame != null) {
        saveUndoPoint();
        flame.resetBokehSettings();
        refreshUI();
    }
}
Also used : Flame(org.jwildfire.create.tina.base.Flame) RenderedFlame(org.jwildfire.create.tina.render.RenderedFlame)

Example 89 with Flame

use of org.jwildfire.create.tina.base.Flame in project JWildfire by thargor6.

the class TinaController method xFormModSaturationRandomizeBtn_Clicked.

public void xFormModSaturationRandomizeBtn_Clicked(boolean pWholeFractal) {
    if (pWholeFractal) {
        Flame flame = getCurrFlame();
        if (flame != null) {
            saveUndoPoint();
            for (Layer layer : flame.getLayers()) {
                for (XForm xForm : layer.getXForms()) {
                    xForm.randomizeModSaturation();
                }
            }
            refreshXFormUI(getCurrXForm(XFormType.BOTH));
            refreshFlameImage(true, false, 1, true, false);
        }
    } else {
        XForm xForm = getCurrXForm(XFormType.NORMAL);
        if (xForm != null) {
            saveUndoPoint();
            xForm.randomizeModSaturation();
            refreshXFormUI(xForm);
            refreshFlameImage(true, false, 1, true, false);
        }
    }
}
Also used : XForm(org.jwildfire.create.tina.base.XForm) Layer(org.jwildfire.create.tina.base.Layer) Flame(org.jwildfire.create.tina.base.Flame) RenderedFlame(org.jwildfire.create.tina.render.RenderedFlame)

Example 90 with Flame

use of org.jwildfire.create.tina.base.Flame in project JWildfire by thargor6.

the class TinaController method allsaveButton_clicked.

public void allsaveButton_clicked() {
    try {
        List<Flame> flames = new ArrayList<>();
        for (FlameThumbnail thumbnail : randomBatch) {
            if (thumbnail.getSelectCheckbox() != null && thumbnail.getSelectCheckbox().isSelected()) {
                flames.add(generateExportFlame(thumbnail.getFlame()));
            }
        }
        if (!flames.isEmpty()) {
            JFileChooser chooser = new FlameFileChooser(prefs);
            if (prefs.getOutputFlamePath() != null) {
                try {
                    chooser.setCurrentDirectory(new File(prefs.getOutputFlamePath()));
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
            if (chooser.showSaveDialog(centerPanel) == JFileChooser.APPROVE_OPTION) {
                File file = chooser.getSelectedFile();
                String filename = file.getAbsolutePath();
                if (!filename.endsWith("." + Tools.FILEEXT_FLAME)) {
                    filename += "." + Tools.FILEEXT_FLAME;
                }
                new FlameWriter().writeFlames(flames, filename);
                messageHelper.showStatusMessage(getCurrFlame(), flames.size() + " " + (flames.size() > 1 ? "flames" : "flame") + " saved to disc");
                prefs.setLastOutputFlameFile(file);
            }
        }
    } catch (Throwable ex) {
        errorHandler.handleError(ex);
    }
}
Also used : FlameWriter(org.jwildfire.create.tina.io.FlameWriter) JFileChooser(javax.swing.JFileChooser) ArrayList(java.util.ArrayList) File(java.io.File) Flame(org.jwildfire.create.tina.base.Flame) RenderedFlame(org.jwildfire.create.tina.render.RenderedFlame)

Aggregations

Flame (org.jwildfire.create.tina.base.Flame)232 RenderedFlame (org.jwildfire.create.tina.render.RenderedFlame)109 Layer (org.jwildfire.create.tina.base.Layer)63 XForm (org.jwildfire.create.tina.base.XForm)55 VariationFunc (org.jwildfire.create.tina.variation.VariationFunc)30 FlameRenderer (org.jwildfire.create.tina.render.FlameRenderer)27 FlameReader (org.jwildfire.create.tina.io.FlameReader)24 File (java.io.File)21 RenderInfo (org.jwildfire.create.tina.render.RenderInfo)21 ArrayList (java.util.ArrayList)17 JFileChooser (javax.swing.JFileChooser)17 SimpleImage (org.jwildfire.image.SimpleImage)17 FlameWriter (org.jwildfire.create.tina.io.FlameWriter)15 Rectangle (java.awt.Rectangle)10 Clipboard (java.awt.datatransfer.Clipboard)10 FlamePanel (org.jwildfire.create.tina.swing.flamepanel.FlamePanel)9 RGBPalette (org.jwildfire.create.tina.palette.RGBPalette)8 Transferable (java.awt.datatransfer.Transferable)7 ResolutionProfile (org.jwildfire.base.ResolutionProfile)7 Test (org.junit.Test)6