X-ray Fraunhofer diffraction from a mirror at grazing angles