インテル® Fortran コンパイラー 19.0 デベロッパー・ガイドおよびリファレンス

SETCOLOR (W*S)

Graphics Function: Sets the current graphics color index.

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

See Also