Hi,
Since the view is at x0:y0 (otherway it will not be rendered correctly over the render target) you only need to add the panel position to the result of vec_to_screen. No more calculations are needed. vec_to_screen takes into account view position and size already.

Salud!