Open vilimek-jakub opened 4 years ago
If you work on JavaFX, firstly I will recommand you to switch on graphstream 2.0 alpha and gs-ui-javafx. The version you use is made for swing interface and we know that can cause some issues.
With that, you can find many tests. Normally I use in my CSS file :
fill-mode: image-scaled;
fill-image: url('"+URL_IMAGE+"');
With URL_IMAGE the absolute link to your image.
I'm sorry that I put it in core. Of course I use gs-ui-javafx and 2.0 alpha. I can't use css for this, because these images can change over time. So I need to change them in the code...
If you use ui-javafx then you should use System.setProperty("org.graphstream.ui", "javafx");
as property.
You said the glitch disappear sometime when you move ? Check if you correctly refresh your view. If you build your own view, then you need to call ViewerPipe on a recurring basis as you can see in the examples.
Ok, I added this property. At first I pumped just once and the graph was rendered once. After changing nodes/edges it refreshed fine, except the glitch. Now I added pumping mechanism and I call ViewerPipe.pump(); every 100 ms and the behaviour is still the same. I think, there is some problem with rendering node/fill-image or css... Any more suggestions?
Hi, I have one glitch during rendering node with png graphics in FX. There is 1 px wide 'boarder' on sides of the node, like on the image There are in fact two on the left node, one above the node and the other on the left side. When I move the camera (mouse, keyboard), the glitch simetimes dissappeares, sometimes remains, as you can see on the right node. For setting image I used the following code:
I couldn't figure out how to set byte[] to node, so I have to create temp file and set node url to the temp file. But the file exists and everything is ok. The dividing by 5 is because we have too big images and I have to scale them a little bit. I also used this css for styling:
Should I use different way to set fill-image? Or set different css for graph or node? Rendering is modified by
We use our own framework for FX, the graph is inside BorderPane/VBox/BorderPane Many thanks for any reply.