Is there anything similar to .Net HatchStyles for filling shapes when using scene shape objects or drawing on JavaFx Canvas (in jdk, third party libraries, sample codes, etc)?
The only solution I currently can think of is using an ImagePattern created via Image screenshots of those .net hatchstyles!
GraphicsContext gc = canvas.getGraphicsContext2D();
ImagePattern pattern = new ImagePattern(new Image("dotnet-pattern.png");
gc.setFill(pattern);
One approach would be a slight modification of what you suggested: use an
ImagePattern
, butsnapshot
an appropriate node for the underlying image.Without actually knowing what the
HatchStyle
s look like, variations on the following might work:This results in