On Wed, 3 Sep 2003 11:54:29 +0900
dagbrown / LART.ca (Dave Brown) wrote:

>     pen.draw(paper) do { polygon; }
> 
> perhaps?  That doesn't make any sense to me, though.

> The point is, we're trying to express the real-life concept of
> "use a tool to do things with stuff", and it sometimes helps and
> sometimes hinders to think in terms of "things that stuff happens
> to" and "things that can do stuff".  Perhaps we need a new idea,
> "things that can perform actions on stuff"--but that's the Unix
> "filters" paradigm....

The fact all of these "feel weird" is a good indication that you're
oversimplifying the process, or not quite modelling it accurately
somehow.  Try this:

    paper.add_to_path(polygon)
    pen.stroke(paper)

Internally, Paper would have a current Path it would be building (which
we don't see here), and Pen#stroke would get this for various
information, and then talk to Paper and lay down actual Ink (which,
presumably, is in the Pen).

It could be tweaked, but this form keeps various things in order:

    *  Where the path goes (translation, rotation, clipping)
    *  What we're drawing with
    *  What we're drawing on (along with filters, device-dependent
       parameters like DPI, etc.)

Of course, this is how everyone else does it, so I just ripped it off,
but it's used for a reason---it works. ;)

-- 
Ryan Pavlik <rpav / mephle.com>

"Let me tell you, I find your math to be highly suspect." - 8BT