djvu: fix calculating the number of rows to draw