Visible to Intel only — GUID: GUID-2AA3748B-9FA7-46EB-A12B-466588B16F0A
Visible to Intel only — GUID: GUID-2AA3748B-9FA7-46EB-A12B-466588B16F0A
GETCURRENTPOSITION, GETCURRENTPOSITION_W
Graphics Subroutines: Return the coordinates of the current graphics position. These routines are only available for Windows.
USE IFQWIN
CALL GETCURRENTPOSITION (s)
CALL GETCURRENTPOSITION_W (s)
s |
(Output) Derived type xycoord. Viewport coordinates of current graphics position. The derived type xycoord is defined in IFQWIN.F90 as follows: TYPE xycoord INTEGER(2) xcoord ! x-coordinate INTEGER(2) ycoord ! y-coordinate END TYPE xycoord |
LINETO, MOVETO, and OUTGTEXT all change the current graphics position. It is in the center of the screen when a window is created.
Graphics output starts at the current graphics position returned by GETCURRENTPOSITION or GETCURRENTPOSITION_W. This position is not related to normal text output (from OUTTEXT or WRITE, for example), which begins at the current text position (see SETTEXTPOSITION). It does, however, affect graphics text output from OUTGTEXT.
! Program to demonstrate GETCURRENTPOSITION
USE IFQWIN
TYPE (xycoord) position
INTEGER(2) result
result = LINETO(INT2(300), INT2(200))
CALL GETCURRENTPOSITION( position )
IF (position%xcoord .GT. 50) THEN
CALL MOVETO(INT2(50), position%ycoord, position)
WRITE(*,*) "Text unaffected by graphics position"
END IF
result = LINETO(INT2(300), INT2(200))
END