      subroutine circle(x0,y0,r)
c
c This routine will draw a filled circle at x0,y0 with a radius
c of r using the current fill color.
c
c James Blake
c @(#)circle.f	1.1  4/3/89 
c
      include 'device_type.h'
      common/local_color/gray_level
      common /cqpbnf/ xold, yold, fac, ires
      common /tscale/ sfactt
c
      
      if(color_ws .or. mono_ws) then
         ixc = screenx(x0)
         iyc = screeny(y0)
         ir = int(3276.7 * r * sfactt)
         call cfcircle(ixc,iyc,ir)
      elseif (PostScript) then

C
C Output color
C
         call plfout (gray_level)
         call plcout (char(32))
C
C put out the origin and radius
C
         call pliout (nint (x0*fac*ires))
         call plcout (char(32))
         call pliout (nint (y0*fac*ires))
         call plcout (char(32))
         call pliout (nint (r*fac*ires))
C
         call plsout (" C\n")
C
         gray_level = 0.0
      endif
      return
      end
