if (py < 0) py = 0;
        else if (py > self.page.maxh) py = self.page.maxh;