Details of showing a 3D view outside the view layout

Happy New Year!

I am trying to show a 3D view outside the view layout,but I can’t adjust the window to a fixed pixel value.

Morever,I customize view layout.But I still can’t adjust the window of 3D view to a fixed pixel value.Its size is adaptive.
image

In short,I need to get picture(screenshot of 3D view) in a fixed pixel value.

Oh, yeah,I have used 3dslicer for a period of time.I’m confused that some slicer python modules or functions lack of description of usage or content.Sometines they also can’t be found in slicer class list or script repository.Can you give me some advice?

Kind regards