I believe I have stumbled across an error in the documentation for the Quickwin graphics subroutines GETVIEWCOORD and GETVIEWCOORD_W. The description says "Translate physical coordinates or window coordinates to viewport coordinates." Presumably the physical coordinates applies to Getviewcoord and the window coordinates applies to Getviewcoord_w. The syntax for the former is
CALL GETVIEWCOORD (x, y, t)
where x, y are INTEGER(2) physical coordinates and t is derived type xycoord having INTEGER(2) members xcoord, ycoord. This much is correct.
The syntax for the latter is
CALL GETVIEWCOORD_W (wx, wy, wt)
where wx, wy are REAL(8) window coordinates and wt is derived type wxycoord having REAL(8) members wx and wy. This must be incorrect, for it implies a conversion from window coordinates to window coordinates. It won't even compile, giving the argument type mismatch error. I believe the correct syntax is
CALL GETVIEWCOORD_W (wx, wy, t)
which would convert window coordinates wx, wy to viewport coordinates t%xcoord, t%ycoord.
In my (very) limited testing so far, this corrected syntax appears to be exactly what the subroutine is doing.