Graphics Subroutine: Stores the screen image defined by a specified bounding rectangle.
Module: USE DFLIB
Syntax
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.
Compatibility
STANDARD GRAPHICS QUICKWIN GRAPHICS LIB
Example
! Build as QuickWin or Standard Graphics
USE DFLIB
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