Non-tile scrolling(sort of)

what code would be needed to make everthing outside of the document box(the white box) not drawn?