Intel® Fortran Compiler 16.0 User and Reference Guide

GETIMAGE, GETIMAGE_W (W*S)

Graphics Subroutines: Store the screen image defined by a specified bounding rectangle.

Module

USE IFQWIN

CALL GETIMAGE (x1,y1,x2,y2,image)

CALL GETIMAGE_W (wx1,wy1,wx2,wy2,image)

x1, y1

(Input) INTEGER(2). Viewport coordinates for upper-left corner of bounding rectangle.

x2, y2

(Input) INTEGER(2). Viewport coordinates for lower-right corner of bounding rectangle.

wx1, wy1

(Input) REAL(8). Window coordinates for upper-left corner of bounding rectangle.

wx2, wy2

(Input) REAL(8). Window coordinates for lower-right corner of bounding rectangle.

image

(Output) INTEGER(1). Array of single-byte integers. Stored image buffer.

GETIMAGE defines the bounding rectangle in viewport-coordinate points ( x1, y1) and ( x2, y2). GETIMAGE_W defines the bounding rectangle in window-coordinate points ( wx1, wy1) and ( wx2, wy2).

The buffer used to store the image must be large enough to hold it. You can determine the image size by calling IMAGESIZE at run time, or by using the formula described under IMAGESIZE. After you have determined the image size, you can dimension the buffer accordingly.

Example

!  Build as QuickWin or Standard Graphics
USE IFQWIN
INTEGER(1), ALLOCATABLE:: buffer (:)
INTEGER(2) status, x, y, error
INTEGER(4) imsize
x = 50
y = 30
status = ELLIPSE ($GFILLINTERIOR, INT2(x-15), &
                  INT2(y-15), INT2( x+15), INT2(y+15))
imsize = IMAGESIZE (INT2(x-16), INT2(y-16), &
                  INT2( x+16), INT2(y+16))
ALLOCATE(buffer (imsize), STAT = error)
IF (error .NE. 0) THEN
  STOP 'ERROR: Insufficient memory'
END IF
CALL GETIMAGE (INT2(x-16), INT2(y-16), &
                  INT2( x+16), INT2(y+16), buffer)
END

See Also