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>BitRGB31 (MSB) 24 23 16 15 8 7 0O O O O O O O O B B B B B B B B G G G G G G G G R R R R R R R RLarger numbers correspond to stronger color intensity with binary 11111111 (hex Z'FF') themaximum for each of the three components. For example, Z'0000FF' yields full-intensity red,Z'00FF00' full-intensity green, Z'FF0000' full-intensity blue, and Z'FFFFFF' full-intensity for allthree, resulting in bright white.GETPIXELSRGB is a much faster way to acquire multiple pixel RGB colors than individual callsto GETPIXELRGB. GETPIXELSRGB returns an array of true color values of multiple pixels, setwith SETPIXELSRGB, SETCOLORRGB, SETBKCOLORRGB, or SETTEXTCOLORRGB,depending on the pixels’ positions and the current configuration of the screen.SETPIXELSRGB (and the other RGB color selection functions SETCOLORRGB,SETBKCOLORRGB, and SETTEXTCOLORRGB) sets colors to a color value chosen from theentire available range. The non-RGB color functions (SETPIXELS, SETCOLOR,SETBKCOLOR, and SETTEXTCOLOR) use color indexes rather than true color values. If youuse color indexes, you are restricted to the colors available in the palette, at most 256. Somedisplay adapters (SVGA and true color) are capable of creating 262,144 (256K) colors or more. Toaccess any available color, you need to specify an explicit RGB value with an RGB color function,rather than a palette index with a non-RGB color function.CompatibilitySTANDARD GRAPHICS QUICKWIN GRAPHICS LIBSee Also: “SETPIXELSRGB”, “GETPIXELRGB, GETPIXELRGB_W”, “GETPIXELS”,“SETPIXELS”Example! Build as QuickWin or Standard GraphicsUSE IFQWININTEGER(4) color(50), resultINTEGER(2) x(50), y(50), statusTYPE (xycoord) posresult = SETCOLORRGB(Z'FF')CALL MOVETO(INT2(0), INT2(0), pos)status = LINETO(INT2(100), INT2(200))! Get 50 pixels at line 30 in viewportDO i = 1, 502-140

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

Saved successfully!

Ooh no, something went wrong!