RenderPeer

I am basing my code off the tutorial demo. I already have a gui previously designed that I want to attach a canvas3D to. How do I do this when the RenderPeer needs actual measurements to create the CanvasPeer?