[Grace-core] Cross platform graphics library

Timothy Jones tim at ecs.vuw.ac.nz
Tue Jan 28 13:47:06 PST 2014


That's procedural, not functional, but it's a really interesting design to let it work both ways. Can you inherit from createCanvas? That'd let you use it like Processing, with an implicit canvas.

w.add(object {
    inherits g.createCanvas
    fill := true
    color := col.blue
    drawRectangleAt(50, 100) sized(20, 30)
})

> On 29/01/2014, at 10:24 am, Alex Sandilands <sandilands.alex at gmail.com> wrote:
> 
> Yeah I saw it, hence the surprise that we were jumping to the conclusion that it's a disaster based on a misunderstanding of how the library works
> 
> Here is just a final reiteration about how both functional and OO works:
> 
> <Screenshot from 2014-01-29 10_15_29.png>
> 
> This gives the output:
> 
> <Screenshot from 2014-01-29 10_14_42.png>
> 
> 
>> On Wed, Jan 29, 2014 at 10:16 AM, Andrew P Black <black at cs.pdx.edu> wrote:
>> 
>>> On 28 Jan 2014, at 12:58 , Alex Sandilands <sandilands.alex at gmail.com> wrote:
>>> 
>>> Did you read actually read it? Every basic shape other than line and image has:
>>> 
>>> // Defines whether this shape should be filled
>>> fill -> Boolean
>> 
>> I did — and commented on what I saw.  This was not one of the things that I saw, which was why I was surprised when Kim explained that filling was a property of the canvas.  I put this down to my not really understanding what canvases were for.
>> 
>> Based on your comment above,  my first reading was correct, and Kim was mistaken.  That's fine.  
>> 
>> Were you able to see the markup I left on your PDF?   I don't know if all PDF viewing tools show it.
>> 
>> 	Andrew
> 
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20140129/61a8b706/attachment.html>


More information about the Grace-core mailing list