JavaFXSmartGraph
JavaFXSmartGraph copied to clipboard
Set icon to Vertex
Hello! Can I set an icon to the Vertex?
I tried using "-fx-background-image: url("./town.png)"
But it was not successful.
What are some options to achieve my goal?
The same question. Thanks for reply
New shapes added to version 2.0.0-rc1! 😄
Regarding images, maybe they can be set to the background of the shapes. I'll have to look into it!
Version 2.0.0-rc2 exemplifies using images as a shape's background. Seems to work 😄
See ExampleMain.java:
graphView.getStylableVertex(tokyo).setStyleInline("-fx-fill: url(\"file:squares.jpg\");");
This can also be set in the smartgraph.css file.
Note that the image will be scaled down to the size of the vertex.