Draw the borders of a BlockViewport before setting the CTM transformation. This way the viewport is relative to the current CTM and the content of the Viewport is relative to the viewport CTM.