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>CALL SETPIXELS(9, x, y, color)ENDSETPIXELSRGBGraphics Subroutine: Sets multiple pixels to the given Red-Green-Blue (RGB) color. Thissubroutine is only available on Windows* systems.Module: USE IFQWINSyntaxCALL SETPIXELSRGB (n, x, y, color)n(Input) INTEGER(4). Number of pixels to be changed. Determines the number of elements inarrays x and y.x, y(Input) INTEGER(2). Parallel arrays containing viewport coordinates of the pixels to set.color(Input) INTEGER(4). Array containing the RGB color values to set the pixels to. Range and resultdepend on the system’s display adapter.SETPIXELSRGB sets the pixels specified in the arrays x and y to the RGB color values in color.These arrays are parallel: the first element in each of the three arrays refers to a single pixel, thesecond element refers to the next pixel, and so on.In each RGB color value, each of the three color values, red, green, and blue, is represented by aneight-bit value (2 hex digits). In the value you set with SETPIXELSRGB, red is the rightmostbyte, followed by green and blue. The RGB value’s internal structure is as follows: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 1111111 (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.A good use for SETPIXELSRGB is as a buffering form of SETPIXELRGB, which can improveperformance substantially. The example code shows how to do this.2-420

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

Saved successfully!

Ooh no, something went wrong!