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

      implicit none
      integer xtv, ytv
      integer pixx, pixy

  Convert image pixels to TV device positions and take into account
  zoom and scroll.  The input is usually the value of an image pixel
  that is going to be put on a zoomed and panned image.

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

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