@jeffmkungusi has joined the channel
A pict is a data type, which describes a shape in terms of a set of functional constructors. A dc<%> describes drawing using imperative, retained-mode drawing commands. You can translate a pict to a set of dc commands (or just perform those commands) but you can’t go backwards.
I’m not sure what it would mean for pict
to implement dc<%>
.
because then you can do pict-stuff with it, like above
If you are interested, there is a pict paper. Somewhere. I forgot the authors, but it’s probably the usual suspects.
In JFP, focused on slideshow but with lots about picts
By Matthew and Robby
@francois.lapeyrere has joined the channel
@mbutterick Another POV: a pict
is a thing you draw, but a dc<%>
provides a canvas to draw into. The dc
pict constructor defines a pict that accepts a dc<%>
and draws into it arbitrarily, but you still can’t draw into that pict. It doesn’t have a dc<%>
“inside” of it any more than map
has a list inside of it.
Having a separate value that represents “a thing you draw” means you can draw the same pict multiple times in different ways, and you can define functions that transform and composite picts arbitrarily.