mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Support PDF-export from Python
This commit is contained in:
@@ -50,7 +50,12 @@ CAF_CMD_SOURCE_INIT( RicSnapshotViewToFileFeature, "RicSnapshotViewToFileFeature
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSnapshotViewToFileFeature::saveSnapshotAs( const QString& fileName, RimViewWindow* viewWindow )
|
||||
{
|
||||
if ( viewWindow )
|
||||
RimPlotWindow* plotWindow = dynamic_cast<RimPlotWindow*>( viewWindow );
|
||||
if ( plotWindow && fileName.endsWith( ".pdf" ) )
|
||||
{
|
||||
savePlotPDFReportAs( fileName, plotWindow );
|
||||
}
|
||||
else if ( viewWindow )
|
||||
{
|
||||
QImage image = viewWindow->snapshotWindowContent();
|
||||
saveSnapshotAs( fileName, image );
|
||||
|
||||
Reference in New Issue
Block a user