I can make a rectangle with JavFX like this:
Rectangle node2 = RectangleBuilder.create()
.x(-100)
.y(-100)
.width(200)
.height(200)
.fill(Color.GREEN)
.build();
but how can I make it use a texture instead of just a color?
TIA
Set the fill to an
ImagePatternThere are additional samples in the ImagePattern javadoc.
For JavaFX8, you will also be able to do this via css.