  Percolation theory is usually applied to lattices with a uniform probability
p that a site is occupied or that a bond is closed. The more general case,
where p is a function of the position x, has received less attention. Previous
studies with long-range spatial variations in p(x) have only investigated cases
where p has a finite, non-zero gradient at the critical point p_c. Here we
extend the theory to two-dimensional cases in which the gradient can change
from zero to infinity. We present scaling laws for the width and length of the
hull (i.e. the boundary of the spanning cluster). We show that the scaling
exponents for the width and the length depend on the shape of p(x), but they
always have a constant ratio 4/3 so that the hull's fractal dimension D=7/4 is
invariant. On this basis, we derive and verify numerically an asymptotic
expression for the probability h(x) that a site at a given distance x from p_c
is on the hull.
