Work in progress: Support capturing snapshots with a given size.

This commit is contained in:
Jon Jenssen authored and JJ committed 2026-06-17 13:55:32 +02:00
1 parent c2811b1db8
commit 361b4bc3db
9 files changed
+96 -1

No files matched your search

@@ -35,6 +35,7 @@
#include "cafPdmUiToolButtonEditor.h"
#include <QPaintDevice>
#include <QPainter>
#include <QRegularExpression>
#include <cvfAssert.h>
@@ -639,6 +640,25 @@ QImage RimMultiPlot::snapshotWindowContent()
return image;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QImage RimMultiPlot::captureSnapshot( int width, int height )
{
QImage image;
if ( m_viewer.isNull() ) return image;
QSize orgViewSize = m_viewer->size();
image = captureImage( m_viewer->bookWidget(), width, height );
m_viewer->resize( orgViewSize );
doUpdateLayout();
return image;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------