Concatenating transforms to scale positions but not objects (the original question)
Scott Palmer
swpalmer at gmail.com
Thu Aug 15 16:17:06 UTC 2019
"It's almost as if the code responsible for doing the layout is not taking the transforms into account ..."
See the bottom of this:
https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/package-summary.html <https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/package-summary.html>
“Visual Bounds vs. Layout Bounds”
Scott
> On Aug 15, 2019, at 10:25 am, Mark Raynsford <org.openjdk at io7m.com> wrote:
>
> 'Ello.
>
> While a decision is being made as to where exactly to ask questions
> about JavaFX, I'd like to return to my original question because this
> is really looking to me like a bug in JavaFX, or some rather nasty
> limitation of the transform system. The reason for this is that the
> external/internal pane setup seems to cause almost everything involved
> to behave phenomenally badly (including external applications that
> traverse the scene graph like ScenicView).
>
> See the original gist:
>
> https://gist.github.com/io7m/20b071e11da2dcd96896a43fad6df644
>
> I would like, as a polite challenge, for someone to have a go at, for
> example, placing a view (such as a button) inside any of the pane
> objects and making it fill the 128x128 space fully - perhaps by changing
> one of the panes to an AnchorPane and setting appropriate constraints.
> As far as I can tell, it can't be done. It seems that the transform
> setup is causing JavaFX to become confused at some fundamental level.
> It's almost as if the code responsible for doing the layout is not
> taking the transforms into account and so treats the space as if it
> were a 1x1 scene pixel area.
>
> The problem with this whole thing is that if I can't solve this problem,
> then the only apparent alternative for me is to express everything in my
> interface in terms of scene pixels and then _iterate over every
> object and manually change transforms every time anyone scrolls or
> zooms_. Being forced to do that would seem to suggest that something
> about the JavaFX scene graph is very much not fit for purpose here.
>
> Annoyingly, this would be a fairly trivial job if I just fell back to
> rendering with OpenGL/Vulkan directly with an orthographic projection
> (of course, then I'd have to do all my own input handling, so I'd
> rather not).
>
> --
> Mark Raynsford | http://www.io7m.com
>
More information about the openjfx-discuss
mailing list