b. geilfuss -
problem set 3
My solution to problem 2 doesn't specify the correct number of
columns, but rather looks at the size of the font it has, and calculates how
many columns and rows it will have accordingly.
Typing a letter will place that letter
where ever the mouse is. On the platform I developed it on (sgi) holding a
key down will allow you to paint with the letter. Holding down the space bar
will erase. I chose this over having the cursor location moving itself
to the right one space after each character was printed (such that one could
type lines continuous lines), simply because that was something I planned on doing in problem 3.
For problem 3, I took my original "black box" code without recompiling and
used it as an engine for adding space rythmns to the text. I chose to let
the text be placed horizontally, and the examning vertical as a resultant of
situations where the horizontal failed (too close to margins). Word wrap
will adjust to a tabbed location (the tab vertically in line with the
mouse- though i'd like to have manipulated this a bit). Control keys which
the black box accepts are:
- ^ for making text all caps
- 1-9 for insert 1-9 spaces between each letter
- > for inserting an ascending number of spaces between each letter
- < for inserting a descending number of spaces between each letter
- del for killing the current modifier
- shit-C for clearing the canvas.