Using Images

Using Images - Working with Images in DrScheme 371 DrScheme...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Working with Images in DrScheme 371 DrScheme supports images as a basic kind of data. You can give images as arguments to functions and have functions return images. Here's a starter guide for working with images. Loading your own Images Most class assignments will give you images to work with. If you want to load your own images: 1. Make sure the image you want to use is on your computer or in your account. 2. Under the "Special" menu, select "Insert Image". 3. Using the dialog box that comes up, open the image file. You can load the standard image formats (gif, jpg, bmp, and probably others). If you save the definitions window when it contains images, the images will be saved as well. Just be aware that files with images are no longer text files, so they won't print/view normally if you print/view them from outside DrScheme. Image Operations The best way to get the current list of image operations is to open DrScheme's HelpDesk (under the help menu) and search for image. You'll find contracts and purpose statements for all image operations defined at your current language level. The operations let you combine images, get the dimensions of images, and search for one image inside another (among other things). DrScheme also includes operations for creating solid and outlined rectangles and circles as basic images. These operations are: rectangle : integer integer symbol symbol -> image creates an image of a rectangle using the given width, height, fill-style and color. The fillstyle should be 'solid or 'outline. circle : integer symbol symbol -> image creates an image of a circle using the given width, height, fill-style and color. The fillstyle should be 'solid or 'outline. Colors are symbols of names of standard colors (there are too many to list here). A symbol is a ' followed by a word, such as 'yellow or 'red. 1102 Home Page ...
View Full Document

This note was uploaded on 02/06/2008 for the course CS 1102 taught by Professor Fisler during the Fall '07 term at WPI.

Ask a homework question - tutors are online