javafx problem

27 views
Skip to first unread message

jms...@xs4all.nl

unread,
Apr 18, 2013, 10:10:49 AM4/18/13
to piccolo...@googlegroups.com
 
Hello,

I have a JFXPanel inside a piccolo2d scene graph (included in a piccolo2d PSwing node). When I zoom in piccolo2d the JavaFX components inside the JFXPanel becone all jagged. Apparently (and understandably?) they do not know their scale has changed and that they should adjust their UI to avoid the jaggies. Does anybody know how I can solve this problem?

Thanks in advance for your help,
John
 

Michael Heuer

unread,
Apr 18, 2013, 11:21:27 AM4/18/13
to piccolo...@googlegroups.com
jms...@xs4all.nl <jms...@xs4all.nl> wrote:

> I have a JFXPanel inside a piccolo2d scene graph (included in a piccolo2d
> PSwing node).

Heh, that is one the most complicated use cases I've seen yet. :)


> When I zoom in piccolo2d the JavaFX components inside the JFXPanel
> becone all jagged. Apparently (and understandably?) they do not
> know their scale has changed and that they should adjust their UI to avoid
> the jaggies. Does anybody know how I can solve this problem?

As far as I know JavaFX has its own scenegraph implementation, so you
may need to pass the current scale from the piccolo2d scene graph into
the JavaFX component somehow, perhaps by overriding paint in your
PSwing node

@Override
public void paint(PPaintContext paintContext) {
javaFxChild.setCurrentScale(renderContext.getScale());
super.paint(paintContext);
}

Stephen Chin (http://steveonjava.com/) was a Piccolo2D dev and is now
involved with JavaFX, you might want to send him a message for further
help.

michael

jmsoft

unread,
Apr 18, 2013, 12:05:41 PM4/18/13
to piccolo...@googlegroups.com

Hello Michael,

Thanks for your very quick answer. I will update you and the community
with Stephen Chin's if I get one.

Regards,
John Meertens


Michael Heuer schreef op 2013-04-18 17:21:
Reply all
Reply to author
Forward
0 new messages