JavaFX provides both low-level path painting methods on a GraphicsContext
and a high-level Path
node.
I want to store shapes in classes and draw them in a GraphicsContext
. The Path
class seems convenient for me. I know, it is meant to be used as a node in the scene graph, but it contains all drawing elements I need.
I am looking for a method like
GraphicsContext.fillPath(Path)
but there is none.
Do I have to iterate over the Path
elements by hand and translate them into low-level GraphicsContext
methods, or did I miss something?