Win32 Graphics Type - MIT/GNU Scheme 9.2
Description: MIT/GNU Scheme 9.2

Next: Custom Operations for Win32 Graphics, Previous: Win32 Graphics, Up: Win32 Graphics

#### 17.10.1 Win32 Graphics Type

Win32 graphics devices are created by specifying the symbol `win32` as the graphics-device-type argument to `make-graphics-device`. The Win32 graphics device type is implemented as a top-level window and supports color drawing in addition to the standard Scheme graphics operations.

Graphics devices are opened as follows:

         (make-graphics-device 'win32 #!optional width height palette)

where width and height specify the size, in pixels, of the drawing area in the graphics window (i.e. excluding the frame). Palette determines the colors available for drawing in the window.

When a color is specified for drawing, the nearest color available in the palette is used. Permitted values for palette are

`'grayscale`
  The window allocates colors from a grayscale palette of approximately 236 shades of gray.
`'grayscale-128`
  The window allocates colors from a grayscale palette of 128 shades of gray.
`'standard`
  The standard palette has good selection of colors and grays.
`#f` or `'system`
  The colors available are those in the system palette. There are usually 16 to 20 colors in the system palette and these are usually sufficent for simple applications like line drawings and x-vs-y graphs of mathematical functions. Drawing with the system palette can be more efficient.

If palette is not specified then the `standard` palette is used.