def mask(self, pattern):
        """A drawing operator that paints the current source
        using the alpha channel of :obj:`pattern` as a mask.
        (Opaque areas of :obj:`pattern` are painted with the source,
        transparent areas are not painted.)

        :param pattern: A :class:`Pattern` object.

        """
        cairo.cairo_mask(self._pointer, pattern._pointer)
        self._check_status()