QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
QgsRasterRendererUtils Class Reference

Utility functions for raster renderers. More...

#include <qgsrasterrendererutils.h>

Static Public Member Functions

static bool parseColorMapFile (const QString &path, QList< QgsColorRampShader::ColorRampItem > &items, Qgis::ShaderInterpolationMethod &type, QStringList &errors)
 Parses an exported color map file at the specified path and extracts the stored color ramp items and ramp shader type.
 
static bool saveColorMapFile (const QString &path, const QList< QgsColorRampShader::ColorRampItem > &items, Qgis::ShaderInterpolationMethod type)
 Exports a list of color ramp items and ramp shader type to a color map file at the specified path.
 

Detailed Description

Utility functions for raster renderers.

Since
QGIS 3.16

Definition at line 30 of file qgsrasterrendererutils.h.

Member Function Documentation

◆ parseColorMapFile()

bool QgsRasterRendererUtils::parseColorMapFile ( const QString &  path,
QList< QgsColorRampShader::ColorRampItem > &  items,
Qgis::ShaderInterpolationMethod type,
QStringList &  errors 
)
static

Parses an exported color map file at the specified path and extracts the stored color ramp items and ramp shader type.

Returns true if the parsing was successful. If not, a list of errors will be generated.

See also
saveColorMapFile()

Definition at line 24 of file qgsrasterrendererutils.cpp.

◆ saveColorMapFile()

bool QgsRasterRendererUtils::saveColorMapFile ( const QString &  path,
const QList< QgsColorRampShader::ColorRampItem > &  items,
Qgis::ShaderInterpolationMethod  type 
)
static

Exports a list of color ramp items and ramp shader type to a color map file at the specified path.

Returns true if the save was successful.

See also
parseColorMapFile()

Definition at line 100 of file qgsrasterrendererutils.cpp.


The documentation for this class was generated from the following files: