Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix savefig size and black image #331
Upon saving an image (snapshot), a new tvtkRenderWindow is created. This is motivated by the fact that under Mac OS, vtkCocoaRenderWindow is the render window being used and if the vtkRenderWindow is contained by an interactor, resizing the renderwindow leads to the resulting image to be rendered only within the initial size. Therefore a new tvtkRenderWindow is needed for saving an image in Mac.
This fix for Mac causes a side effect for Linux which is that when offscreen is off, saving an image will create a new window. Forcing offscreen to true for the dummy tvtkRenderWindow would enhance the user experience but render the savefig function completely unusable if the machine does not support offscreen.