[GEF4] Multiple parts/visuals for the same model object [message #1732758] |
Fri, 20 May 2016 03:06 |
|
I have a couple of model objects that are quite tricky to render - they essentially need the same geometric shape rendered twice with two different paints, a background and a foreground if you like.
In GEF 3.x this was fairly easy - I had a single Figure that just drew the shape twice with different styles on the graphic context.
This seems a bit harder in GEF4/JavaFX. I have tried using a Canvas, but it kills performance when the overall drawing area is large, and it loses the connection to the geometric shape that you get with GeometryNode.
So, I was wondering if it was possible to create two parts for the same model object, one for the background and one for the foreground?
Colin Sharples
CTG Games Ltd
Wellington, New Zealand
|
|
|
Re: [GEF4] Multiple parts/visuals for the same model object [message #1732785 is a reply to message #1732758] |
Fri, 20 May 2016 08:24 |
|
Hi Colin,
currently, it is not possible to have two content parts for the same model object. However, you can use Pair<OriginalModelObject, ForegroundOrBackground> as your model objects to practically achieve the same. On the other hand, it could be more convenient to use only one content part that manages two GeometryNodes for its visualization (wrapped in a Group).
Best regards,
Matthias
|
|
|
Powered by
FUDForum. Page generated in 0.02267 seconds