mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
Set animation properties for map settings when exporting animations
This commit is contained in:
parent
2268689cd1
commit
5451f22017
@ -58,6 +58,8 @@ The returned list may be non-contiguous and have gaps in the ranges. The ranges
|
||||
|
||||
QList<QgsMapDecoration *> decorations;
|
||||
|
||||
double frameRate;
|
||||
|
||||
};
|
||||
|
||||
static bool exportAnimation( const QgsMapSettings &mapSettings, const AnimationExportSettings &settings, QString &error /Out/, QgsFeedback *feedback = 0 );
|
||||
|
||||
@ -101,6 +101,7 @@ bool QgsTemporalUtils::exportAnimation( const QgsMapSettings &mapSettings, const
|
||||
navigator.setFrameDuration( settings.frameDuration );
|
||||
QgsMapSettings ms = mapSettings;
|
||||
const QgsExpressionContext context = ms.expressionContext();
|
||||
ms.setFrameRate( settings.frameRate );
|
||||
|
||||
const long long totalFrames = navigator.totalFrameCount();
|
||||
long long currentFrame = 0;
|
||||
@ -121,6 +122,7 @@ bool QgsTemporalUtils::exportAnimation( const QgsMapSettings &mapSettings, const
|
||||
|
||||
ms.setIsTemporal( true );
|
||||
ms.setTemporalRange( navigator.dateTimeRangeForFrameNumber( currentFrame ) );
|
||||
ms.setCurrentFrame( currentFrame );
|
||||
|
||||
QgsExpressionContext frameContext = context;
|
||||
frameContext.appendScope( navigator.createExpressionContextScope() );
|
||||
|
||||
@ -167,6 +167,13 @@ class CORE_EXPORT QgsTemporalUtils
|
||||
//! List of decorations to draw onto exported frames.
|
||||
QList<QgsMapDecoration *> decorations;
|
||||
|
||||
/**
|
||||
* Target animation frame rate in frames per second.
|
||||
*
|
||||
* \since QGIS 3.26
|
||||
*/
|
||||
double frameRate = 30;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user