[Grace-core] Cross platform graphics library

James Noble kjx at ecs.vuw.ac.nz
Tue Jan 28 13:22:02 PST 2014


> On 27 Jan 2014, at 23:00, Kim Bruce <kim at cs.pomona.edu> wrote:
> 
>> Can't tell if graphic objects are filled or framed.  I see later that this depends on a flag set on the canvas. 
> 
> I didn’t notice this — but then, as I said, I don’ understand the overall model.  But I think that its a disaster!  The kind of object you get should depend on the arguments to the factory that creates it, not on what canvas it is eventually pasted onto.

the question is - what should the API be?    Lots of graphic interfances have a pair of drawXX and fillXX methods;
Alex's design has just drwXX methods I think. 

> The Squeak re-impleemntation of Morphic removed this requirement:  Graphical objects can be draw directly on the screen, without the need for a window at the top.  The allows for the nice “splash screen” effects that are otherwise impossible.   The top of the hierarchy is the “world”, which is the whole display screen.  Of course, the enclosing platform may not allow this, in which case the “world” is the portion of the screen owned by the enclosing platform, such as the browser.

the main thing is you have some special kind of Morph at the top - it's still a Morph.

> Another place where you might want to look at others’ work is in eliminating the requirement that windows be rectangular.  I recall that then Jim Gettys removed this from X-windows (this was more than 20 years ago, IIRC, he said that the code got simpler) by a few lines.    I don’t recall, though, what was used instead — but there must be literature on it.  

so the questions are whether the underlying platforms support that
(given that we're not planning on reimplementing anything!)
and how important that is (versus supporting images, or something else like that

James


More information about the Grace-core mailing list