Teachpacks for How to Design Programs
Composing Images
This teachpack provides primitives for constructing and
manipulating images.
These functions create basic shapes. The mode can be either
'solid
, meaning the shape is filled in, or
'outline
, meaning the shape is hollow. Colors
can be either strings, symbols, or color structs (see
below).
These functions build more complex images from the basic
shapes. When two images are laid on top of each other, the
are lined up at their pinhole. Most shapes have their
pinholes right in the middle. The exceptions are
text
and line
which have their
pinholes in the top-left corner.
After an image has been built up using overlays, it is
possible to recover the position of the pieces of the image,
using the next two functions.
The rest of this teachpack are supplementary functions for
manipulating images and colors.