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>GETTEXTCOLORRGB returns the RGB color value of text over the background color (used bytext functions such as OUTTEXT, WRITE, and PRINT), set with SETTEXTCOLORRGB. TheRGB color value used for graphics is set and returned with SETCOLORRGB andGETCOLORRGB. SETCOLORRGB controls the color used by the graphics functionOUTGTEXT, while SETTEXTCOLORRGB controls the color used by all other text outputfunctions. The RGB background color value for both text and graphics is set and returned withSETBKCOLORRGB and GETBKCOLORRGB.SETTEXTCOLORRGB (and the other RGB color selection functions SETBKCOLORRGB, andSETCOLORRGB) sets the color to a color value chosen from the entire available range. Thenon-RGB color functions (SETTEXTCOLOR, SETBKCOLOR, and SETCOLOR) 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: “SETTEXTCOLORRGB”, “GETBKCOLORRGB”, “GETCOLORRGB”,“GETTEXTCOLOR”Example! Build as QuickWin or Standard GraphicsUSE IFQWININTEGER(4) oldtextc, oldbackc, tempTYPE (rccoord) curpos! Save color settingsoldtextc = GETTEXTCOLORRGB()oldbackc = GETBKCOLORRGB()CALL CLEARSCREEN( $GCLEARSCREEN )! Reset colorstemp = SETTEXTCOLORRGB(Z'00FFFF') ! full red + full green! = full yellow texttemp = SETBKCOLORRGB(Z'FF0000') ! blue backgroundCALL SETTEXTPOSITION( INT2(4), INT2(15), curpos)CALL OUTTEXT( 'Hello, world')! Restore colorstemp = SETTEXTCOLORRGB(oldtextc)temp = SETBKCOLORRGB(oldbackc)2-146

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

Saved successfully!

Ooh no, something went wrong!