QGIS API Documentation
3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
src
core
raster
qgsrastershader.h
Go to the documentation of this file.
1
/* **************************************************************************
2
qgsrastershader.h - description
3
-------------------
4
begin : Fri Dec 28 2007
5
copyright : (C) 2007 by Peter J. Ersts
6
email :
[email protected]
7
8
****************************************************************************/
9
10
/* **************************************************************************
11
* *
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
16
* *
17
***************************************************************************/
18
19
20
#ifndef QGSRASTERSHADER_H
21
#define QGSRASTERSHADER_H
22
23
#include "qgis_core.h"
24
#include "
qgis_sip.h
"
25
#include "
qgsreadwritecontext.h
"
26
27
class
QDomDocument;
28
class
QDomElement;
29
class
QgsRasterShaderFunction
;
30
35
class
CORE_EXPORT
QgsRasterShader
36
{
37
38
public
:
39
QgsRasterShader
(
double
minimumValue = 0.0,
double
maximumValue = 255.0 );
40
41
QgsRasterShader
(
const
QgsRasterShader
&rh ) =
delete
;
42
QgsRasterShader
&
operator=
(
const
QgsRasterShader
&rh ) =
delete
;
43
44
/*
45
*
46
* Non-Static Inline methods
47
*
48
*/
49
55
double
maximumValue
()
const
{
return
mMaximumValue; }
56
62
double
minimumValue
()
const
{
return
mMinimumValue; }
63
64
QgsRasterShaderFunction
*
rasterShaderFunction
() {
return
mRasterShaderFunction.get(); }
65
const
QgsRasterShaderFunction
*
rasterShaderFunction
()
const
{
return
mRasterShaderFunction.get(); }
SIP_SKIP
66
67
/*
68
*
69
* Non-Static methods
70
*
71
*/
72
83
bool
shade(
double
value,
84
int
*returnRedValue
SIP_OUT
,
85
int
*returnGreenValue
SIP_OUT
,
86
int
*returnBlueValue
SIP_OUT
,
87
int
*returnAlpha
SIP_OUT
);
88
101
bool
shade(
double
redValue,
102
double
greenValue,
103
double
blueValue,
104
double
alphaValue,
105
int
*returnRedValue
SIP_OUT
,
106
int
*returnGreenValue
SIP_OUT
,
107
int
*returnBlueValue
SIP_OUT
,
108
int
*returnAlpha
SIP_OUT
)
const
;
109
114
void
setRasterShaderFunction(
QgsRasterShaderFunction
*function
SIP_TRANSFER
);
115
121
void
setMaximumValue(
double
value );
122
128
void
setMinimumValue(
double
value );
129
133
void
writeXml( QDomDocument &doc, QDomElement &parent,
const
QgsReadWriteContext
&context =
QgsReadWriteContext
() )
const
;
134
138
void
readXml(
const
QDomElement &elem,
const
QgsReadWriteContext
&context =
QgsReadWriteContext
() );
139
140
private
:
141
#ifdef SIP_RUN
142
QgsRasterShader
(
const
QgsRasterShader
&rh );
143
#endif
144
146
double
mMinimumValue;
147
149
double
mMaximumValue;
150
152
std::unique_ptr< QgsRasterShaderFunction > mRasterShaderFunction;
153
154
};
155
#endif
QgsRasterShaderFunction
The raster shade function applies a shader to a pixel at render time - typically used to render grays...
Definition
qgsrastershaderfunction.h:35
QgsRasterShader
Interface for all raster shaders.
Definition
qgsrastershader.h:36
QgsRasterShader::maximumValue
double maximumValue() const
Returns the maximum value for the raster shader.
Definition
qgsrastershader.h:55
QgsRasterShader::operator=
QgsRasterShader & operator=(const QgsRasterShader &rh)=delete
QgsRasterShader::QgsRasterShader
QgsRasterShader(const QgsRasterShader &rh)=delete
QgsRasterShader::rasterShaderFunction
const QgsRasterShaderFunction * rasterShaderFunction() const
Definition
qgsrastershader.h:65
QgsRasterShader::minimumValue
double minimumValue() const
Returns the minimum value for the raster shader.
Definition
qgsrastershader.h:62
QgsRasterShader::rasterShaderFunction
QgsRasterShaderFunction * rasterShaderFunction()
Definition
qgsrastershader.h:64
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition
qgsreadwritecontext.h:34
qgis_sip.h
SIP_SKIP
#define SIP_SKIP
Definition
qgis_sip.h:126
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:36
SIP_OUT
#define SIP_OUT
Definition
qgis_sip.h:58
qgsreadwritecontext.h
Generated on Sat Nov 23 2024 09:26:05 for QGIS API Documentation by
1.9.8