SubScene => Node.localToWindow() ?
Eric Le Ponner
eric.le.ponner at oracle.com
Tue Jul 8 12:52:43 UTC 2014
Hi Kevin
I created https://javafx-jira.kenai.com/browse/RT-37855.
Eric
Le 8 juil. 2014 à 14:36, Kevin Rushforth <kevin.rushforth at oracle.com> a écrit :
> Hi Eric,
>
> This seems like a reasonable request to me. Please file a new JIRA (Tweak) with component=SceneGraph and we (Martin) can take a look.
>
> -- Kevin
>
>
> Eric Le Ponner wrote:
>> Folks,
>>
>> I started playing with SubScene a few days ago.
>> And I realized that I could not use Node.localToScene() as I did before.
>>
>> When there is no SubScene in the scene graph, Node.localToScene() is
>> basically a way to convert local coordinates to window coordinates (because
>> Scene and Window can be considered as one entity).
>>
>> When there are SubScene's, then Node.localToScene() convert local
>> coordinates to coordinates *relative to the closest enclosing SubScene*.
>> These coordinates are not relative to the window anymore. To get window coordinates, you need to call Node.localToScene() up to the root Scene.
>>
>> This computation could be performed by FX and named Node.localToWindow() for instance. With SubScene now in the picture, this seems pretty consistent with existing FX design.
>>
>> Any opinion ?
>>
>> Eric
>>
>>
More information about the openjfx-dev
mailing list