Replace rectangle with its transformation by matrix m.

def transform(self, m):
        """Replace rectangle with its transformation by matrix m."""
        if not len(m) == 6:
            raise ValueError("bad sequ. length")
        self.x0, self.y0, self.x1, self.y1 = TOOLS._transform_rect(self, m)
        return self