Filter-response line shapes of resonant waveguide gratings