Graphics GET and PUT Change Colors to Monochrome in QuickBASIC (33038)






This article was previously published under Q33038

SUMMARY

The graphics GET statement in QuickBASIC Version 1.00 for the Macintosh does not preserve the colors of graphics in its array argument, and a subsequent graphics PUT using that array will draw in monochrome, using only the current foreground and background colors.

The following list shows how the GET statement translates pixel colors on the screen and stores them in the array:

  1. White (or current background color) <= yellow, magenta, cyan, white
  2. Black (or current foreground color) <= red, green, blue, black

MORE INFORMATION

The GET statement captures screen information as a bitmap only, i.e., only the on or off status of each pixel -- not the color information -- is stored in the array.

The ForeColor and BackColor MBLC routines let you change the color used by subsequent graphics statements. For example, invoking ForeColor and BackColor will cause a subsequent graphics PUT to use that foreground and that background for all pixels (regardless of any multiple colors that were on the screen when the graphics GET filled the array).

For an example of how to create color images with ForeColor and BackColor in Macintosh QuickBASIC, run the Crazy Colors program found in the "QB Demos" folder on the Examples disk that comes with QuickBASIC Version 1.00.

Modification Type: Minor Last Reviewed: 1/8/2003
Keywords: KB33038