API Review RT:17407 Canvas Node
richard.bair at oracle.com
Wed Apr 25 12:43:52 PDT 2012
> I would have used this in my last project to create:
> - a PDF viewer with ability to draw markup/scribble on it
> - a highly graphical custom component that looked like a 'clipboard' (actually a 'permit board' hanging from a wall)
> - a 'flingable' carousel of the above components that the user can horizontally flip through (touch screen)
> - a scrollable site map showing a schematic of an industrial site
> - annotated images (ie markup/scribble on photos taken)
> - simple CAD diagram rendering
> Most of these things _could_ be built using 'Nodes' in a Group but a canvas feels more natural and straight forward (eg mouse detection on a map). This could be because it's what I'm used to in Swing but either way I would have used Canvas if I had it.
Just a quick note on this: don't expect great performance from immediate mode. I guarantee that on some platforms and chipsets such as PowerVR, immediate mode will be much slower. Also, we're not going to compute a damage rectangle to hand you, so you will have to manage your own dirty regions if you want to paint only a portion of the canvas. It really is intended only for specific drawing tasks which don't scale to a scene graph, such as particle systems or such things.
More information about the openjfx-dev