Fix Pixmap doesn't know self.width when creating mask.