API Review RT:17407 Canvas Node

Jim Graham james.graham at oracle.com
Wed Apr 25 17:05:39 PDT 2012

If, potentially, the grid was "infinite in dimension with panning", then 
you'd have to keep recreating the Path every time they panned around. 
Some might find it easier to just use direct rendering in that case, but 
using a Path node and recreating it's segments would not be 
significantly different in terms of amount of work.


On 4/25/12 1:01 PM, Richard Bair wrote:
> Nah, the way to do this is with a single Path node. Just do a series of line-to and move-to. No need to use either canvas or rectangles.
> Richard
> On Apr 24, 2012, at 8:45 AM, Pedro Duque Vieira wrote:
>>> Regardless of how the implementation discussion ends up, the driving
>>> question should be what do developers expect a 2D Canvas to do? I think of
>>> things like photoshop, Illustrator, 8 bit arcade games, animations, 2D CAD
>>> apps, Flow chart designers and the like.
>> Actually there is another scenario which might be common to several types
>> of apps.
>> An example: imagine your app has a background like a grid and the grid
>> spacing might change dynamically. If you create this grid right now you
>> might have to instantiate thousands of rectangle nodes (each rectangle
>> being a grid square) which will degrade performance severely and also
>> memory consumption.
>> But if you use something like a Canvas node as the background grid,
>> everything will be much better.
>> Cheers,
>> --
>> Pedro Duque Vieira

More information about the openjfx-dev mailing list