QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Contains settings relating to exporting layouts to raster images. More...
#include <qgslayoutexporter.h>
Public Member Functions | |
ImageExportSettings () | |
Constructor for ImageExportSettings. More... | |
Public Attributes | |
QgsMargins | cropMargins |
Crop to content margins, in pixels. More... | |
bool | cropToContents = false |
Set to true if image should be cropped so only parts of the layout containing items are exported. More... | |
double | dpi = -1 |
Resolution to export layout at. If dpi <= 0 the default layout dpi will be used. More... | |
bool | exportMetadata = true |
Indicates whether image export should include metadata generated from the layout's project's metadata. More... | |
QgsLayoutRenderContext::Flags | flags = QgsLayoutRenderContext::Flags() |
Layout context flags, which control how the export will be created. More... | |
bool | generateWorldFile = false |
Set to true to generate an external world file alongside exported images. More... | |
QSize | imageSize |
Manual size in pixels for output image. More... | |
QList< int > | pages |
List of specific pages to export, or an empty list to export all pages. More... | |
QVector< qreal > | predefinedMapScales |
A list of predefined scales to use with the layout. More... | |
Contains settings relating to exporting layouts to raster images.
Definition at line 148 of file qgslayoutexporter.h.
|
inline |
Constructor for ImageExportSettings.
Definition at line 151 of file qgslayoutexporter.h.
QgsMargins QgsLayoutExporter::ImageExportSettings::cropMargins |
Crop to content margins, in pixels.
These margins will be added to the bounds of the exported layout if cropToContents is true
.
Definition at line 182 of file qgslayoutexporter.h.
bool QgsLayoutExporter::ImageExportSettings::cropToContents = false |
Set to true
if image should be cropped so only parts of the layout containing items are exported.
Definition at line 176 of file qgslayoutexporter.h.
double QgsLayoutExporter::ImageExportSettings::dpi = -1 |
Resolution to export layout at. If dpi <= 0 the default layout dpi will be used.
Definition at line 156 of file qgslayoutexporter.h.
bool QgsLayoutExporter::ImageExportSettings::exportMetadata = true |
Indicates whether image export should include metadata generated from the layout's project's metadata.
Definition at line 205 of file qgslayoutexporter.h.
QgsLayoutRenderContext::Flags QgsLayoutExporter::ImageExportSettings::flags = QgsLayoutRenderContext::Flags() |
Layout context flags, which control how the export will be created.
Definition at line 211 of file qgslayoutexporter.h.
bool QgsLayoutExporter::ImageExportSettings::generateWorldFile = false |
Set to true
to generate an external world file alongside exported images.
Definition at line 197 of file qgslayoutexporter.h.
QSize QgsLayoutExporter::ImageExportSettings::imageSize |
Manual size in pixels for output image.
If imageSize is not set then it will be automatically calculated based on the output dpi and layout size.
If cropToContents is true
then imageSize has no effect.
Be careful when specifying manual sizes if pages in the layout have differing sizes! It's likely not going to give a reasonable output in this case, and the automatic dpi-based image size should be used instead.
Definition at line 170 of file qgslayoutexporter.h.
QList< int > QgsLayoutExporter::ImageExportSettings::pages |
List of specific pages to export, or an empty list to export all pages.
Page numbers are 0 index based, so the first page in the layout corresponds to page 0.
Definition at line 191 of file qgslayoutexporter.h.
QVector<qreal> QgsLayoutExporter::ImageExportSettings::predefinedMapScales |
A list of predefined scales to use with the layout.
This is used for maps which are set to the predefined atlas scaling mode.
Definition at line 218 of file qgslayoutexporter.h.