mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-07 00:15:48 -04:00
Merge pull request #62535 from nyalldawson/backport_62488
Add (hidden) setting to force raster clip masks for layout exports (3.44 backport)
This commit is contained in:
commit
cf08ec10dd
@ -314,6 +314,7 @@ Layout graphical items for displaying a map.
|
||||
%End
|
||||
public:
|
||||
|
||||
|
||||
enum AtlasScalingMode /BaseType=IntEnum/
|
||||
{
|
||||
Fixed,
|
||||
|
@ -314,6 +314,7 @@ Layout graphical items for displaying a map.
|
||||
%End
|
||||
public:
|
||||
|
||||
|
||||
enum AtlasScalingMode
|
||||
{
|
||||
Fixed,
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "qgslabelingresults.h"
|
||||
#include "qgsvectortileutils.h"
|
||||
#include "qgsunittypes.h"
|
||||
#include "qgssettingstree.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QPainter>
|
||||
@ -47,6 +48,8 @@
|
||||
#include <QStyleOptionGraphicsItem>
|
||||
#include <QTimer>
|
||||
|
||||
const QgsSettingsEntryBool *QgsLayoutItemMap::settingForceRasterMasks = new QgsSettingsEntryBool( QStringLiteral( "force-raster-masks" ), QgsSettingsTree::sTreeLayout, false, QStringLiteral( "Whether to force rasterised clipping masks, regardless of output format." ) );
|
||||
|
||||
QgsLayoutItemMap::QgsLayoutItemMap( QgsLayout *layout )
|
||||
: QgsLayoutItem( layout )
|
||||
, mAtlasClippingSettings( new QgsLayoutItemMapAtlasClippingSettings( this ) )
|
||||
@ -1751,6 +1754,10 @@ QgsMapSettings QgsLayoutItemMap::mapSettings( const QgsRectangle &extent, QSizeF
|
||||
jobMapSettings.setSimplifyMethod( mLayout->renderContext().simplifyMethod() );
|
||||
jobMapSettings.setMaskSettings( mLayout->renderContext().maskSettings() );
|
||||
jobMapSettings.setRendererUsage( Qgis::RendererUsage::Export );
|
||||
if ( settingForceRasterMasks->value() )
|
||||
{
|
||||
jobMapSettings.setFlag( Qgis::MapSettingsFlag::ForceRasterMasks, true );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -321,6 +321,13 @@ class CORE_EXPORT QgsLayoutItemMap : public QgsLayoutItem, public QgsTemporalRan
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Settings entry - Whether to force rasterised clipping masks, regardless of output format.
|
||||
*
|
||||
* \since QGIS 4.0
|
||||
*/
|
||||
static const QgsSettingsEntryBool *settingForceRasterMasks SIP_SKIP;
|
||||
|
||||
/**
|
||||
* Scaling modes used for the serial rendering (atlas)
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user