Intel® Fortran Compiler 18.0 Developer Guide and Reference
Graphics Function: Sets the current graphics color index.
USE IFQWIN
result = SETCOLOR (color)
color |
(Input) INTEGER(2). Color index to set the current graphics color to. |
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.
USE IFQWIN
INTEGER(2) color, oldcolor
LOGICAL status
TYPE (windowconfig) wc
status = GETWINDOWCONFIG(wc)
color = wc%numcolors - 1
oldcolor = SETCOLOR(color)
END