1C GRSCRL -- scroll pixels in viewport 2C+ 3 SUBROUTINE GRSCRL (DX, DY) 4 INTEGER DX, DY 5C 6C Shift the pixels in the viewport by DX and DY in device coordinates. 7C-- 8C 24-Feb-97: new routine [TJP]. 9C----------------------------------------------------------------------- 10 INCLUDE 'grpckg1.inc' 11 INTEGER NBUF, LCHR 12 REAL RBUF(6) 13 CHARACTER*8 CHR 14C 15C Do nothing if device is not open or not in appropriate state. 16C 17 IF (GRCIDE.LT.1) RETURN 18 IF (.NOT.GRPLTD(GRCIDE)) RETURN 19C 20C If device has scroll capability, use it. The arguments in 21C RBUF are: (1..4) current viewport in device coordinates; 22C (5..6) scroll displacement in world coordinates. 23C 24 IF (GRGCAP(GRCIDE)(11:11).EQ.'S') THEN 25 RBUF(1) = NINT(GRXMIN(GRCIDE)) 26 RBUF(2) = NINT(GRYMIN(GRCIDE)) 27 RBUF(3) = NINT(GRXMAX(GRCIDE)) 28 RBUF(4) = NINT(GRYMAX(GRCIDE)) 29 RBUF(5) = DX 30 RBUF(6) = DY 31 NBUF = 6 32 LCHR = 0 33 CALL GREXEC(GRGTYP,30,RBUF,NBUF,CHR,LCHR) 34C 35C Otherwise, report an error. 36C 37 ELSE 38 CALL GRWARN('Device does not support scrolling') 39 END IF 40 END 41