add_clip_rect() accepts a rectangle in viewport-relative coordinates, so it must be translated by the enclosing scroll offset to be displayed correctly inside a scrollable box.