# SETVIEWPORT (W*S)

Graphics Subroutine: Redefines the graphics viewport by defining a clipping region in the same manner as SETCLIPRGN and then setting the viewport-coordinate origin to the upper-left corner of the region.

## Module

USE IFQWIN

CALL SETVIEWPORT (x1,y1,x2,y2)

x1, y1 | (Input) INTEGER(2). Physical coordinates for upper-left corner of viewport.
x2, y2 | (Input) INTEGER(2). Physical coordinates for lower-right corner of viewport.

The physical coordinates (x1, y1) and (x2, y2) are the upper-left and lower-right corners of the rectangular clipping region. Any window transformation done with the SETWINDOW function is relative to the viewport, not the entire screen.

## Example

     USE IFQWIN
     INTEGER(2) upx, upy
     INTEGER(2) downx, downy

     upx = 0
     upy = 30
     downx= 250
     downy = 100
     CALL SETVIEWPORT(upx, upy, downx, downy)

Parent topic: Graphics Library Routines

## See Also

GETVIEWCOORD
GETPHYSCOORD
GRSTATUS
SETCLIPRGN
SETVIEWORG
SETWINDOW