12.07.2015 Views

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>Larger numbers correspond to stronger color intensity with binary 1111111 (hex FF) the maximumfor each of the three components. For example, Z'0000FF' yields full-intensity red, Z'00FF00'full-intensity green, Z'FF000' full-intensity blue, and Z'FFFFFF' full-intensity for all three,resulting in bright white.GETCOLORRGB returns the RGB color value of graphics over the background color (used bygraphics functions such as ARC, ELLIPSE, and FLOODFILLRGB), set with SETCOLORRGB.GETBKCOLORRGB returns the RGB color value of the current background for both text andgraphics, set with SETBKCOLORRGB. GETTEXTCOLORRGB returns the RGB color value oftext over the background color (used by text functions such as OUTTEXT, WRITE, and PRINT),set with SETTEXTCOLORRGB.SETCOLORRGB (and the other RGB color selection functions SETBKCOLORRGB andSETTEXTCOLORRGB) sets the color to a value chosen from the entire available range. Thenon-RGB color functions (SETCOLOR, SETBKCOLOR, and SETTEXTCOLOR) use colorindexes rather than true color values. If you use color indexes, you are restricted to the colorsavailable in the palette, at most 256. Some display adapters (SVGA and true color) are capable ofcreating 262,144 (256K) colors or more. To access any available color, you need to specify anexplicit RGB value with an RGB color function, rather than a palette index with a non-RGB colorfunction.CompatibilitySTANDARD GRAPHICS QUICKWIN GRAPHICS LIBSee Also: “GETBKCOLORRGB”, “GETTEXTCOLORRGB”, “SETCOLORRGB”,“GETCOLOR”Example! Build as a QuickWin or Standard Graphics App.USE IFQWININTEGER(2) numfontsINTEGER(4) fore, oldcolornumfonts = INITIALIZEFONTS ( )oldcolor = SETCOLORRGB(Z'FF')! set graphics! color to redfore = GETCOLORRGB()oldcolor = SETBKCOLORRGB(fore) ! set background! to graphics colorCALL CLEARSCREEN($GCLEARSCREEN)oldcolor = SETCOLORRGB (Z'FF0000') ! set graphics! color to blueCALL OUTGTEXT("hello, world")2-106

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

Saved successfully!

Ooh no, something went wrong!