12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>901 FORMAT (A)ENDGETCOLORGraphics Function: Returns the current graphics color index. This function is only available onWindows* systems.Module: USE IFQWINSyntaxresult = GETCOLOR ( )Results:The result type is INTEGER(2). The result is the current color index, if successful; otherwise, –1.GETCOLOR returns the current color index used for graphics over the background color as setwith SETCOLOR. The background color index is set with SETBKCOLOR and returned withGETBKCOLOR. The color index of text over the background color is set with SETTEXTCOLORand returned with GETTEXTCOLOR. These non-RGB color functions use color indexes, not truecolor values, and limit the user to colors in the palette, at most 256. For access to all system colors,use SETCOLORRGB, SETBKCOLORRGB, and SETTEXTCOLORRGB.CompatibilitySTANDARD GRAPHICS QUICKWIN GRAPHICS LIBSee Also: “GETCOLORRGB”, “GETBKCOLOR”, “GETTEXTCOLOR”, “SETCOLOR”Example! Program to demonstrate GETCOLORPROGRAM COLORSUSE IFQWININTEGER(2) loop, loop1, status, colorLOGICAL(4) winstatREAL rnd1, rnd2, xnum, ynumtype (windowconfig) wcstatus = SETCOLOR(INT2(0))! Color random pixels with 15 different colorsDO loop1 = 1, 15color = INT2(MOD(GETCOLOR() +1, 16))status = SETCOLOR (color) ! Set to next colorDO loop = 1, 75! Set color of random spot, normalized to be on screen2-104

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!