[Grace-core] Cross platform graphics library
Alex Sandilands
sandilands.alex at gmail.com
Tue Jan 28 14:09:52 PST 2014
An application of that would be if you wanted a canvas with a black
background or something:
w.add(object {
inherits g.createCanvas
// Default color is black, fill is true by default
drawRectangleAt(0, 0) sized(width, height)
}
On Wed, Jan 29, 2014 at 10:52 AM, Alex Sandilands <sandilands.alex at gmail.com
> wrote:
>
> On Wed, Jan 29, 2014 at 10:47 AM, Timothy Jones <tim at ecs.vuw.ac.nz> wrote:
>
>> 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)
>> })
>>
>
> Yup that should work fine
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20140129/f6bc7433/attachment-0001.html>
More information about the Grace-core
mailing list