1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrastershaderfunction.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsRasterShaderFunction
{
%Docstring(signature="appended")
The raster shade function applies a shader to a pixel at render time -
typically used to render grayscale images as false color.
%End
%TypeHeaderCode
#include "qgsrastershaderfunction.h"
#include "qgscolorrampshader.h"
%End
%ConvertToSubClassCode
if ( dynamic_cast<QgsColorRampShader *>( sipCpp ) != NULL )
sipType = sipType_QgsColorRampShader;
else
sipType = 0;
%End
public:
QgsRasterShaderFunction( double minimumValue = 0.0, double maximumValue = 255.0 );
virtual ~QgsRasterShaderFunction();
virtual void setMaximumValue( double value );
%Docstring
Sets the maximum ``value`` for the raster shader.
.. seealso:: :py:func:`setMinimumValue`
.. seealso:: :py:func:`maximumValue`
%End
virtual void setMinimumValue( double value );
%Docstring
Sets the minimum ``value`` for the raster shader.
.. seealso:: :py:func:`setMaximumValue`
.. seealso:: :py:func:`minimumValue`
%End
virtual bool shade( double value,
int *returnRedValue /Out/,
int *returnGreenValue /Out/,
int *returnBlueValue /Out/,
int *returnAlpha /Out/ ) const;
%Docstring
Generates an new RGBA value based on one input ``value``.
:param value: The original value to base a new RGBA value on
:return: - ``True`` if the return values are valid otherwise ``False``
- returnRedValue: The red component of the new RGBA value
- returnGreenValue: The green component of the new RGBA value
- returnBlueValue: The blue component of the new RGBA value
- returnAlpha: The alpha component of the new RGBA value
%End
virtual bool shade( double redValue,
double greenValue,
double blueValue,
double alphaValue,
int *returnRedValue /Out/,
int *returnGreenValue /Out/,
int *returnBlueValue /Out/,
int *returnAlpha /Out/ ) const;
%Docstring
Generates an new RGBA value based on an original RGBA value.
:param redValue: The red component of the original value to base a new
RGBA value on
:param greenValue: The green component of the original value to base a
new RGBA value on
:param blueValue: The blue component of the original value to base a new
RGBA value on
:param alphaValue: The alpha component of the original value to base a
new RGBA value on
:return: - ``True`` if the return values are valid otherwise ``False``
- returnRedValue: The red component of the new RGBA value
- returnGreenValue: The green component of the new RGBA value
- returnBlueValue: The blue component of the new RGBA value
- returnAlpha: The alpha component of the new RGBA value
%End
double minimumMaximumRange() const;
double minimumValue() const;
%Docstring
Returns the maximum value for the raster shader.
.. seealso:: :py:func:`setMaximumValue`
.. seealso:: :py:func:`minimumValue`
%End
double maximumValue() const;
%Docstring
Returns the minimum value for the raster shader.
.. seealso:: :py:func:`setMinimumValue`
.. seealso:: :py:func:`maximumValue`
%End
virtual void legendSymbologyItems( QList< QPair< QString, QColor > > &symbolItems /Out/ ) const;
%Docstring
Returns legend symbology items if provided by renderer.
%End
int labelPrecision() const;
%Docstring
Returns label precision
.. versionadded:: 3.16
%End
void setLabelPrecision( int labelPrecision );
%Docstring
Sets label precision to ``labelPrecision``
.. versionadded:: 3.16
%End
protected:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrastershaderfunction.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|