[Grace-core] Grace Graphics API?

James Noble kjx at ecs.vuw.ac.nz
Wed May 22 23:55:05 PDT 2013


On 22/05/2013, at 23:46 PM, Michael Homer <Michael.Homer at ecs.vuw.ac.nz> wrote:

> No it doesn't, it uses a canvas, which is implicitly double-buffered.
> The GTK one isn't, but it could be (patches welcome!). See
> sample/js/simplegraphics.grace and grace-gtk:simplegraphics.grace. The
> actual API is fundamentally the same up to spelling. There are no
> elements added and it does the drawing itself.

the simplegraphics API surely is retained: in the GTK version the simplegraphics
module itself maintains a display list ("instructions") that is drawn by the module in response to 
"draw" events; there doesn't seem to be a "clear" command but there could be....

The JS api (again, I assume) just adds things to the canvas (OK so they're not DOM "elements"?
or am I missing something?)   but doesn't have to worry about redrawing 
(or, again, about clearing) 


the questions seem to be:

 - what graphics/UI model do we want in general
 - and threading model, if any, is required to support the graphics/UI model 
     (not a general solution for the whole language) in particular

James


More information about the Grace-core mailing list