      subroutine calclipmax(x0,x1,y0,y1,dxclip,dyclip)
      include 'Parametres.f'
      data grand,petit / 3. , .5 /
      dxclip = x1-x0
      dyclip = y1-y0
      x0clipmax = x0 - grand*dxclip 
      x1clipmax = x1 + grand*dxclip 
      y0clipmax = y0 - grand*dyclip 
      y1clipmax = y1 + grand*dyclip 
      x0clipmed = x0 - petit*dxclip 
      x1clipmed = x1 + petit*dxclip 
      y0clipmed = y0 - petit*dyclip 
      y1clipmed = y1 + petit*dyclip 
      end
c--------------------------------------------------------
      logical*4 function trestresloin(x,y)
      include 'Parametres.f'
      if (x.gt.x1clipmax.or.x.lt.x0clipmax.or.
     &    y.gt.y1clipmax.or.y.lt.y0clipmax ) then
        trestresloin = .true.
      else
        trestresloin = .false.
      endif
      end
c--------------------------------------------------------
      logical*4 function assezloin(x,y)
      include 'Parametres.f'
      if (x.gt.x1clipmed.or.x.lt.x0clipmed.or.
     &    y.gt.y1clipmed.or.y.lt.y0clipmed ) then
        assezloin = .true.
      else
        assezloin = .false.
      endif
      end

