center_at Subroutine

private subroutine center_at(cx, cy)

Pan so a world position becomes view centre.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: cx

x of new centre, in world coords.

real(kind=real64), intent(in) :: cy

y of new centre, in world coords.


Source Code

   subroutine center_at(cx, cy)
      !! Pan so a world position becomes view centre.
      ! Arguments
      real(real64), intent(in) :: cx
         !! x of new centre, in world coords.
      real(real64), intent(in) :: cy
         !! y of new centre, in world coords.
      real(real64) :: a, b, d
      a = xtrans(st%xmin); b = xtrans(st%xmax)
      d = cx - 0.5d0*(a + b)
      st%xmin = inv_x(a + d); st%xmax = inv_x(b + d)
      a = ytrans2(st%ymin); b = ytrans2(st%ymax)
      d = cy - 0.5d0*(a + b)
      st%ymin = inv_y(a + d); st%ymax = inv_y(b + d)
      st%xauto = .false.; st%yauto = .false.
   end subroutine center_at