mirror of
https://github.com/Noratrieb/mandelbrotGUI.git
synced 2026-01-14 23:35:04 +01:00
Preview is now shown
This commit is contained in:
parent
eb71992b08
commit
97d87fb1ba
5 changed files with 58 additions and 15 deletions
|
|
@ -4,6 +4,7 @@ import javafx.event.ActionEvent;
|
|||
import javafx.scene.image.Image;
|
||||
import javafx.scene.image.ImageView;
|
||||
import mandelbrotCalculator.MandelbrotSet;
|
||||
import util.Values;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
|
|
@ -13,18 +14,15 @@ public class Controller {
|
|||
|
||||
public ImageView setPreview;
|
||||
|
||||
int currentFrame;
|
||||
public void nextImage(int frameNumber) throws FileNotFoundException {
|
||||
|
||||
public void showImage(ActionEvent actionEvent) throws FileNotFoundException {
|
||||
|
||||
InputStream stream = new FileInputStream("C:\\Users\\nilsh\\IdeaProjects\\testStuff\\sequence/Sequence" + currentFrame + ".png");
|
||||
InputStream stream = new FileInputStream(Values.SAVE_IMAGE_PATH + frameNumber + ".png");
|
||||
Image image = new Image(stream);
|
||||
setPreview.setImage(image);
|
||||
currentFrame++;
|
||||
}
|
||||
|
||||
public void startCalculation(ActionEvent actionEvent) {
|
||||
MandelbrotSet m = new MandelbrotSet(2, 2, 3, 10);
|
||||
MandelbrotSet m = new MandelbrotSet(2, 1, 3, 100, this);
|
||||
m.startMandelbrot();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue