Visible to Intel only — GUID: GUID-74562F88-CC10-4CD4-93BE-1AF307F41F36
Visible to Intel only — GUID: GUID-74562F88-CC10-4CD4-93BE-1AF307F41F36
SETCOLOR
Graphics Function: Sets the current graphics color index. This routine is only available for Windows.
Module
USE IFQWIN
result = SETCOLOR (color)
color |
(Input) INTEGER(2). Color index to set the current graphics color to. |
Results
The result type is INTEGER(2). The result is the previous color index if successful; otherwise, -1.
The SETCOLOR function sets the current graphics color index, which is used by graphics functions such as ELLIPSE. The background color index is set with SETBKCOLOR. The color index of text over the background color is set with SETTEXTCOLOR. These non-RGB color functions use color indexes, not true color values, and limit the user to colors in the palette, at most 256. For access to all system colors, use SETCOLORRGB, SETBKCOLORRGB, and SETTEXTCOLORRGB.
Example
USE IFQWIN
INTEGER(2) color, oldcolor
LOGICAL status
TYPE (windowconfig) wc
status = GETWINDOWCONFIG(wc)
color = wc%numcolors - 1
oldcolor = SETCOLOR(color)
END