Graphics Function: Defines a window bound by the specified coordinates.
Module: USE DFLIB
Syntax
Results:
The result is of type INTEGER(2). The result is nonzero if successful; otherwise, 0 (for example, if the program that calls SETWINDOW is not in a graphics mode).
The SETWINDOW function determines the coordinate system used by all window-relative graphics routines. Any graphics routines that end in _W (such as ARC_W, RECTANGLE_W, and LINETO_W) use the coordinate sytem set by SETWINDOW.
Any window transformation done with the SETWINDOW function is relative to the viewport, not the entire screen.
An arc drawn using inverted window coordinates is not an upside-down version of an arc drawn with the same parameters in a noninverted window. The arc is still drawn counterclockwise, but the points that define where the arc begins and ends are inverted.
If wx1 equals wx2 or wy1 equals wy2, SETWINDOW fails.
Compatibility
STANDARD GRAPHICS QUICKWIN GRAPHICS LIB
See Also: GETWINDOWCOORD, SETCLIPRGN, SETVIEWORG, SETVIEWPORT, GRSTATUS, ARC_W, LINETO_W, MOVETO_W, PIE_W, POLYGON_W, RECTANGLE_W
Example
USE DFLIB
INTEGER(2) status
LOGICAL(2) invert /.TRUE./
REAL(8) upx /0.0/, upy /0.0/
REAL(8) downx /1000.0/, downy /1000.0/
status = SETWINDOW(invert, upx, upy, downx, downy)