Reputation: 17
I've got some drawing on Canvas which will be translate and rotate depends on changing values, and I need to draw a "static" line on the same Canvas object which will be independent of my changing values. To be specific, I don't want to move this line anywhere. Any ideas how to make that?
Upvotes: 0
Views: 165
Reputation: 10650
There is no way in JavaFX to alter an existing drawing on a canvas. If you want to change something you will have to paint it again. So your static line will be just one more shape that you will have to draw again when your data changes. You may consider using the scene graph instead which is normally better suited for such a scenario.
Upvotes: 1