[UP]


Manual Reference Pages  - getgp2 (3)

NAME

getgp2(3f) - [M_draw:POSITION] Gets the current graphics position in world coordinates (LICENSE:PD)

CONTENTS

Synopsis
Description
Returns
Example

SYNOPSIS

subroutine getgp2(x, y) real,intent(out) :: x,y

DESCRIPTION

Gets the current graphics position in world coords.

RETURNS

X X coordinate of current position
Y Y coordinate of current position

EXAMPLE

Sample program:

     program demo_getgp2
     use M_draw
     implicit none
     real :: X,Y
     call prefsize(20,20)
     call vinit(’ ’) ! start graphics using device $M_DRAW_DEVICE
     call ortho2(-100.0,100.0,-100.0,100.0)
     call move2(0.0,0.0)
     call draw2(96.5,98.333)

call getgp2(X,Y) write(*,*)’CURRENT POSITION (X,Y)=’,X,Y

call vexit() end program demo_getgp2

Results

   CURRENT POSITION (X,Y)=   96.5000000       98.3330002


getgp2 (3) March 11, 2021
Generated by manServer 1.08 from c1f90436-c40a-42e7-bbf9-17df53a6e079 using man macros.