Reputation: 2517
Coming from AWT/Swing, I've started experimenting a bit with JavaFX the last few days. I realized that what I used to do in thousands lines of codes can now be done in a few hundred.
One problem I came across is, however, the following: I'm trying to develop a small painting app where the user can choose brush size and color for its strokes. For all the strokes the user makes, I use the JavaFX class Path
and add these paths to a Group
(which is added to a Pane
) where they are - automagically - painted. Now I want to store the resulting image as a jpg and try to raster all the paths in a BufferedImage. However, I found no functions in the API that help me do that.
I tried to use Canvas
and its GraphicsContext
, but that did not help. How could I raster all the JavaFX Path
s from a list on an image?
Upvotes: 1
Views: 775
Reputation: 159290
Upvotes: 2