Duplicating a Node
Pavel Safrata
pavel.safrata at oracle.com
Mon Mar 18 02:22:11 PDT 2013
Hi John,
I tried to use reflection on node with PerspectiveTransform and I don't
see anything wrong with it - no alternating size, no incorrect
reflection. Could you please elaborate on what you are trying to
achieve? Code that I used:
Rectangle rect = new Rectangle(100, 50, Color.RED);
Reflection r = new Reflection();
r.setInput(new PerspectiveTransform(50, 40, 100, 40, 170, 80,
0, 80));
rect.setEffect(r);
Regards,
Pavel
On 15.3.2013 19:07, John Hendrikx wrote:
> Hi list,
>
> I'm trying to achieve an effect that requires me to make a copy of a
> Node, apply some effect(s) on it (PerspectiveTransform, Clip, Blend
> and perhaps DisplacementMap) and place it in the same scenegraph
> together with the original.
>
> It is very similar to what Reflection achieves, but without
> alternating the size of the Node, and without the limitations
> (specifically, creating the correct Reflection for an object that has
> a PerspectiveTransform applied to it already cannot be done with
> Reflection).
>
> I would prefer not to have to make an actual copy of the Node, as they
> might get out of sync and not display the same content when they
> should be. Something like a NodeReference class, that takes another
> Node as parameter but applies different effects/clips/transforms.
>
> Since the code I'm using for this is based on Cells getting laid out,
> I'm toying with the idea of actually asking the provider of those
> cells twice for the same cell and applying different transformations
> on each, but they might get out of sync and it seems there should be a
> better way.
>
> Any ideas or suggestions at how I could best achieve this, or would it
> be a new feature?
>
> --John
More information about the openjfx-dev
mailing list