QGIS/python/core/effects/qgsblureffect.sip

158 lines
3.8 KiB
Plaintext
Raw Normal View History

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 *
************************************************************************/
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
2017-12-15 10:36:55 -04:00
methods.
2017-05-23 14:33:31 +02:00
.. versionadded:: 2.9
%End
2017-05-23 14:33:31 +02:00
%TypeHeaderCode
#include "qgsblureffect.h"
%End
public:
enum BlurMethod
{
2017-05-23 14:33:31 +02:00
StackBlur,
GaussianBlur
};
static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Creates a new QgsBlurEffect effect from a properties string map.
:param map: encoded properties string map
:return: new QgsBlurEffect
:rtype: QgsPaintEffect
2017-05-23 14:33:31 +02:00
%End
QgsBlurEffect();
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsBlurEffect.
%End
virtual QString type() const;
virtual QgsStringMap properties() const;
virtual void readProperties( const QgsStringMap &props );
virtual QgsBlurEffect *clone() const /Factory/;
2015-04-07 14:27:39 +02:00
void setBlurLevel( const int level );
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets blur level (strength)
:param level: blur level. Depending on the current blurMethod(), this parameter
has different effects
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`blurLevel`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`blurMethod`
2017-05-23 14:33:31 +02:00
%End
int blurLevel() const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the blur level (strength)
:return: blur level. Depending on the current blurMethod(), this parameter
:rtype: int
has different effects
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setBlurLevel`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`blurMethod`
2017-05-23 14:33:31 +02:00
%End
void setBlurMethod( const BlurMethod method );
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the blur method (algorithm) to use for performing the blur.
:param method: blur method
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`blurMethod`
2017-05-23 14:33:31 +02:00
%End
BlurMethod blurMethod() const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the blur method (algorithm) used for performing the blur.
:return: blur method
:rtype: BlurMethod
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setBlurMethod`
2017-05-23 14:33:31 +02:00
%End
void setOpacity( const double opacity );
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``opacity`` for the effect.
:param opacity: double between 0 and 1 inclusive, where 0 is fully transparent
and 1 is fully opaque
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`opacity()`
2017-05-23 14:33:31 +02:00
%End
double opacity() const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the opacity for the effect.
:return: opacity value between 0 and 1 inclusive, where 0 is fully transparent
:rtype: float
and 1 is fully opaque
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOpacity()`
2017-05-23 14:33:31 +02:00
%End
void setBlendMode( const QPainter::CompositionMode mode );
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the blend mode for the effect
:param mode: blend mode used for drawing the effect on to a destination
paint device
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`blendMode`
2017-05-23 14:33:31 +02:00
%End
QPainter::CompositionMode blendMode() const;
2017-05-23 14:33:31 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the blend mode for the effect
:return: blend mode used for drawing the effect on to a destination
:rtype: QPainter.CompositionMode
paint device
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setBlendMode`
2017-05-23 14:33:31 +02:00
%End
protected:
virtual void draw( QgsRenderContext &context );
virtual QRectF boundingRect( const QRectF &rect, const QgsRenderContext &context ) const;
};
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 *
************************************************************************/