Good day!

The following code is available:

Pane.setStyle("-fx-shape: \"M 0,0 200,0 180,100 0,100 Z\";"); 

How to implement the result obtained using this line with the command:

Pane.setShape(...);

  • Perhaps it is worth creating Polygon on these four points by analogy as here and already transfer it to setShape - diraria

1 answer 1

 SVGPath svgPath = new SVGPath(); svgPath.setContent( "M 0,0 200,0 180,100 0,100 Z" ); pane.setShape( svgPath );