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
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrastershader.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsRasterShader
{
%Docstring(signature="appended")
Interface for all raster shaders.
%End
%TypeHeaderCode
#include "qgsrastershader.h"
%End
public:
QgsRasterShader( double minimumValue = 0.0, double maximumValue = 255.0 );
double maximumValue() const;
%Docstring
Returns the maximum value for the raster shader.
.. seealso:: :py:func:`setMaximumValue`
.. seealso:: :py:func:`minimumValue`
%End
double minimumValue() const;
%Docstring
Returns the minimum value for the raster shader.
.. seealso:: :py:func:`setMinimumValue`
.. seealso:: :py:func:`maximumValue`
%End
QgsRasterShaderFunction *rasterShaderFunction();
bool shade( double value,
int *returnRedValue /Out/,
int *returnGreenValue /Out/,
int *returnBlueValue /Out/,
int *returnAlpha /Out/ ) const;
%Docstring
Generates a 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
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 a 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
void setRasterShaderFunction( QgsRasterShaderFunction *function /Transfer/ );
%Docstring
A public method that allows the user to set their own shader
``function``.
.. note::
Raster shader takes ownership of the shader function instance
%End
void setMaximumValue( double value );
%Docstring
Sets the maximum ``value`` for the raster shader.
.. seealso:: :py:func:`setMinimumValue`
.. seealso:: :py:func:`maximumValue`
%End
void setMinimumValue( double value );
%Docstring
Sets the minimum ``value`` for the raster shader.
.. seealso:: :py:func:`setMaximumValue`
.. seealso:: :py:func:`minimumValue`
%End
void writeXml( QDomDocument &doc, QDomElement &parent, const QgsReadWriteContext &context = QgsReadWriteContext() ) const;
%Docstring
Writes shader state to an XML element.
%End
void readXml( const QDomElement &elem, const QgsReadWriteContext &context = QgsReadWriteContext() );
%Docstring
Reads shader state from an XML element.
%End
private:
QgsRasterShader( const QgsRasterShader &rh );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/raster/qgsrastershader.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|