Image-manipulation functions defined in tiles-world

Many of the functions in tiles-world are documented in DrScheme's help desk, so I won't repeat their full descriptions here: type either "image.ss" or "world.ss" into the search field of DrScheme's help desk. The ones you're most likely to use from "image.ss" are

Wherever a function takes in a "mode", you may use either a symbol or a string, i.e. any of 'solid, 'outline, "solid", or "outline".

The functions from "world.ss" are

In addition, tiles-world provides several other useful functions:

image-above : image image -> image
produces an image with the first image "above" (i.e. closer to the top of the screen) the second. The pinholes are lined up in the x dimension; the pinhole of the result is halfway between the pinholes of the two images.
image-beside : image image -> image
produces an image with the first image to the left of the second. The pinholes are lined up in the y dimension; the pinhole of the result is halfway between the pinholes of the two images.
reflect-vert : image -> image
Reflects the given image top-to-bottom.
reflect-horiz : image -> image
Reflects the given image left-to-right and bottom.
reflect-main-diag : image -> image
Reflects the given image across the diagonal from top-left to bottom-right; in other words, it swaps top-right with bottom-left.
reflect-other-diag : image -> image
Reflects the given image across the diagonal from top-right to bottom-left; in other words, it swaps top-left with bottom-right.
rotate-cw : image -> image
Rotates the given image 90 degrees clockwise around its pinhole.
rotate-ccw : image -> image
Rotates the given image 90 degrees counterclockwise around its pinhole.
rotate-180 : image -> image
Rotates the given image 180 degrees around its pinhole.
show-pinhole : image -> image
Adds a small black dot to the image so you can see where the pinhole is (useful in debugging).
on-redraw-event : (World -> Image) -> true
(on-redraw-event draw-world) installs the draw-world function to be called on the current world every time the screen needs refreshing; the result will appear in the animation window in place of whatever was there before.

Last modified: Fri May 20 14:42:10 EDT 2005
Stephen Bloch / sbloch@adelphi.edu