fixed bug with drawing masked borders for off-screen viewports