[Grace-core] Cross platform graphics library

Andrew P. Black black at cs.pdx.edu
Tue Jan 28 07:22:04 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.

On 28 Jan 2014, at 5:03, James Noble <kjx at ecs.vuw.ac.nz> wrote:

> This would mean that Component, Canvas, Container, and Drawable would be merged into 
> just one interface - "Morph".  Most of the method implementations would pretty much stay the same. 
> (have to work out how drawing works, typically there's a requirement you need a window object at the 
> top of each instance hierarhcy that passes itself (or its canvas, or its graphics context)  down to the
> drawing methods) 


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.

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.  

	Andrew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20140128/494b64bd/attachment.html>


More information about the Grace-core mailing list