Pathinterface. Each segment can be straight or curved. The
Strokemethod of the
VBTinterface actually draws the shape given by a path.
The result is shown in the image Draw:
An object of type
contains a path that is roughly in the shape of the state of Texas.
This shape is carefully designed not in accordance with the precise geography
of the state, but so that a tessellation of the plane is possible.
The path is made in units of pixels.
Repaint subprocedure uses the path to draw the shape
is several places.
Four vertically ascending rows are drawn.
A nested subprocedure
Pair draws two adjacent shapes at a time.
One is filled in with the color red,
the other is outlined in the color blue.
Rather than create the paint operations explicitly in the main
this program (and all the remaining programs that require them)
import the operations from another module.
serves no other purpose than
removing some code from the program.
The painting operations that the module provides are
those that simply paint a particular solid color.
of different paint operations are provided
operations used by
The implementation of the module,
as well as the interface,
can be found in the appendix