2017-05-23 14:33:31 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/effects/qgsblureffect.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
class QgsBlurEffect : QgsPaintEffect
|
|
|
|
{
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
A paint effect which blurs a source picture, using a number of different blur
|
|
|
|
methods.
|
|
|
|
|
|
|
|
.. versionadded:: 2.9
|
2015-03-28 20:03:37 +11:00
|
|
|
%End
|
|
|
|
|
2017-05-23 14:33:31 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsblureffect.h"
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
public:
|
|
|
|
|
|
|
|
enum BlurMethod
|
|
|
|
{
|
2017-05-23 14:33:31 +02:00
|
|
|
StackBlur,
|
|
|
|
GaussianBlur
|
2015-03-28 20:03:37 +11:00
|
|
|
};
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
Creates a new QgsBlurEffect effect from a properties string map.
|
|
|
|
\param map encoded properties string map
|
|
|
|
:return: new QgsBlurEffect
|
|
|
|
:rtype: QgsPaintEffect
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
QgsBlurEffect();
|
|
|
|
|
|
|
|
virtual QString type() const;
|
|
|
|
virtual QgsStringMap properties() const;
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual void readProperties( const QgsStringMap &props );
|
|
|
|
virtual QgsBlurEffect *clone() const /Factory/;
|
2015-04-07 14:27:39 +02:00
|
|
|
|
2015-03-28 20:03:37 +11:00
|
|
|
void setBlurLevel( const int level );
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
Sets blur level (strength)
|
|
|
|
\param level blur level. Depending on the current blurMethod(), this parameter
|
|
|
|
has different effects
|
|
|
|
.. seealso:: blurLevel
|
|
|
|
.. seealso:: blurMethod
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
int blurLevel() const;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the blur level (strength)
|
|
|
|
:return: blur level. Depending on the current blurMethod(), this parameter
|
|
|
|
has different effects
|
|
|
|
.. seealso:: setBlurLevel
|
|
|
|
.. seealso:: blurMethod
|
|
|
|
:rtype: int
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
void setBlurMethod( const BlurMethod method );
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the blur method (algorithm) to use for performing the blur.
|
|
|
|
\param method blur method
|
|
|
|
.. seealso:: blurMethod
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
BlurMethod blurMethod() const;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the blur method (algorithm) used for performing the blur.
|
|
|
|
:return: blur method
|
|
|
|
.. seealso:: setBlurMethod
|
|
|
|
:rtype: BlurMethod
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
void setTransparency( const double transparency );
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the transparency for the effect
|
|
|
|
\param transparency double between 0 and 1 inclusive, where 0 is fully opaque
|
|
|
|
and 1 is fully transparent
|
|
|
|
.. seealso:: transparency
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
double transparency() const;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the transparency for the effect
|
|
|
|
:return: transparency value between 0 and 1 inclusive, where 0 is fully opaque
|
|
|
|
and 1 is fully transparent
|
|
|
|
.. seealso:: setTransparency
|
|
|
|
:rtype: float
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
void setBlendMode( const QPainter::CompositionMode mode );
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
Sets the blend mode for the effect
|
|
|
|
\param mode blend mode used for drawing the effect on to a destination
|
|
|
|
paint device
|
|
|
|
.. seealso:: blendMode
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
QPainter::CompositionMode blendMode() const;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
|
|
|
Returns the blend mode for the effect
|
|
|
|
:return: blend mode used for drawing the effect on to a destination
|
|
|
|
paint device
|
|
|
|
.. seealso:: setBlendMode
|
|
|
|
:rtype: QPainter.CompositionMode
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual void draw( QgsRenderContext &context );
|
|
|
|
virtual QRectF boundingRect( const QRectF &rect, const QgsRenderContext &context ) const;
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
};
|
2017-05-23 14:33:31 +02:00
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/effects/qgsblureffect.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|