I tried to make snapshot of my node. But my node is not fit the parent, so i should use ScrollPane. It's looks well on my scene, but when i save the snapshot as png, it has some problems with backgroung color.

So i want to create SnapshotParameters and setFill() according to css -fx-background-color. So how to do this?

The program has some different themes, so hardcoded color isn't good idea.

    -fx-background-color: #1E1E1E;
    -fx-background: #1E1E1E;

SnapshotParameters snapshotParameters = new SnapshotParameters();

0 Answers