      SUBROUTINE WHERE(XNOW,YNOW,DFACT)
C
C     NAME: WHERE
C
C    LANGUAGE:  FORTRAN
C
C    OPERATING SYSTEM:  UNIVERSAL
C
C    ORDER NUMBER:  5428-SE
C
C    PART NUMBER:  000-026366  NOVEMBER 1985
C
C    PRODUCT:  UNIVERSAL VERSAPLOT COLOR RANDOM 2.0
C
C    VERSATEC, INC., SANTA CLARA, CALIFORNIA 95051
C    A XEROX COMPANY
C
C    Copyright (C) 1985 by Xerox Corporation.  All rights reserved.
C
C    "NOTICE. THIS PROGRAM IS THE EXCLUSIVE PROPERTY OF VERSATEC,
C    INC. AND IS ISSUED IN STRICT CONFIDENCE UNDER A PREARRANGED
C    LICENSE AGREEMENT AND IS NOT TO BE DISCLOSED IN ANY MANNER TO
C    PERSONS OUTSIDE THE LICENSED ORGANIZATION AND SHALL NOT BE
C    REPRODUCED OR DISSEMINATED, IN WHOLE OR PART, TO ANYONE OUTSIDE
C    THE LICENSED ORGANIZATION WITHOUT THE PRIOR WRITTEN APPROVAL OF
C    VERSATEC, INC. UNLESS OTHERWISE PROVIDED FOR BY SUCH LICENSE
C    AGREEMENT.  THIS WORK IS PROTECTED AS AN UNPUBLISHED WORK UNDER
C    THE COPYRIGHT ACT OF 1976."
C
C     WHERE - RETURN PRESENT LOCATION AND DRAWING FACTOR
C
C     SUBROUTINE WHERE CONFORMS TO STANDARD DESCRIPTIONS,
C     RETURNING TO XNOW, YNOW THE PRESENT 'PEN' POSITION (AS
C     REFERENCED FROM THE CURRENT SOFTWARE ORIGIN) AND TO DFACT
C     THE CURRENT DRAWING FACTOR RATIO.
C
C     ENTRY: CALL WHERE(XNOW,YNOW,DFACT)
C
C            XNOW - VARIABLE TO BE FILLED WITH THE X-COORDINATE OF
C                   THE PRESENT 'PEN' POSITION. (REAL)
C            YNOW - VARIABLE TO BE FILLED WITH THE Y-COORDINATE OF
C                   THE PRESENT 'PEN' POSITION.(REAL)
C            DFACT - VARIABLE TO BE SET TO THE CURRENT DRAWING FACTOR
C                   RATIO.(REAL)
C
C     EXIT: RETURN
C
C     CALLS: NONE
C
C     CALLED BY: USER
C
C     COMMON USED:
C     /DVCOM/
C            R FACT    - CURRENT SCALING FACTOR. USED BY *FACTOR*
C            R VCP()   - CURRENT POINT IN COMPUTATIONAL COORDINATES
C
C     /MSGCOM/
C            R RELARG()- ARRAY FOR PASSING REAL OUTPUT ARGUMENTS
C
C
C
C
      LOGICAL ROT90,PMOVE,IPDEF,DASHPN,XMAJOR,VSFLAG
      INTEGER PWIDTH,XNIPS,YNIPS,PENPAT,VSMAX,PFONT
C...  COMMON /DVCOM/  PHASE I COMMON VARIABLES
C
      COMMON /DVCOM/
     *         ANC,    DASHPN, FACT,   HTC,    ICUT,   ICWTV,  ICXPTS,
     *         IEOJ,   ILWM,   ILWP,   IOPEN,  ISORT,  ITFLAG, IX1,
     *         IX2,    IY1,    IY2,    JFONT,  JPEN,   KPAT,   KWIDTH,
     *         LASTX,  LASTY,  MAXPAT, MSB,    MSKALL, NCH,    NCLIP,
     *         NIBSX,  NLPAT,  NPLOT,  PFONT,  PMOVE,  PXMIN,  PXMAX,
     *         PYMIN,  PYMAX,  RADN,   ROT90,  SXC,    SYC,    TSINA,
     *         TCOSA,  XDEN,   XFAC,   XNIPS,  XOFF,   YDEN,   YFAC,
     *         YOFF,   YNIPS,  VSFLAG, VSMAX,  XMAJOR,
     *         IPAT(16,256), IEOP(4),  IHBUF(2), IPDEF(64),
     *         NPAT(255),    PENPAT(4,64), PWIDTH(64),
     *         RORG(2), VCP(2), VP(4), WIN(4), WTV(4), WX(4),  WY(4),
     *         IAUTXT(15)
C
C
C
C...  COMMON /MSGCOM/ - MESSAGE OUTPUT VARIABLES
C
      COMMON /MSGCOM/ INTARG(8), RELARG(12)
C
C
C
C
C...  RETURN PRESENT X AND Y COORDINATES AND DRAWING FACTOR
      XNOW = VCP(1)
      YNOW = VCP(2)
C
C...  CHECK IF PLOT ROTATED
      IF (.NOT. ROT90)  GO TO 100
      XNOW = VCP(2)
      YNOW = -VCP(1)
  100 XNOW = XNOW - RORG(1)
      YNOW = YNOW - RORG(2)
      DFACT = FACT
C
C-D   DEBUG MESSAGE
C     RELARG(1)=XNOW
C     RELARG(2)=YNOW
C     RELARG(3)=DFACT
C     CALL MSGLG1(106)
C-D
C
      RETURN
C
      END
