%N tvtopx %F $MIR/src/subs/tv.for
%D Convert TV device position to image pixels.
%P jm
%: tv, display
%B
      subroutine tvtopx(xtv, ytv, pixx, pixy)

      implicit none
      integer xtv, ytv
      integer pixx, pixy

  Convert TV device position to image pixels and take into account
  zoom and scroll.  The input is usually the value returned by a
  call to TvCursor and is converted so that the position can be
  compared with the unzoomed, unpanned image.

  Inputs:
    xtv     I     Screen x position before zoom and scroll.
    ytv     I     Screen y position before zoom and scroll.

  Output:
    pixx    I     Pixel x position after zoom and scroll.
    pixy    I     Pixel y position after zoom and scroll.
