Skip to content

Commit

Permalink
sipify core effects
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 24, 2017
1 parent 827c19f commit 09d3e2f
Show file tree
Hide file tree
Showing 14 changed files with 1,557 additions and 1,101 deletions.
9 changes: 0 additions & 9 deletions python/auto_sip.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ core/composer/qgspaperitem.sip
core/composer/qgsscalebarstyle.sip
core/composer/qgssingleboxscalebarstyle.sip
core/composer/qgsticksscalebarstyle.sip
core/effects/qgsblureffect.sip
core/effects/qgscoloreffect.sip
core/effects/qgseffectstack.sip
core/effects/qgsgloweffect.sip
core/effects/qgsimageoperation.sip
core/effects/qgspainteffect.sip
core/effects/qgspainteffectregistry.sip
core/effects/qgsshadoweffect.sip
core/effects/qgstransformeffect.sip
core/gps/qgsgpsconnection.sip
core/gps/qgsgpsconnectionregistry.sip
core/gps/qgsgpsdconnection.sip
Expand Down
144 changes: 87 additions & 57 deletions python/core/effects/qgsblureffect.sip
Original file line number Diff line number Diff line change
@@ -1,99 +1,129 @@
/** \ingroup core
* \class QgsBlurEffect
* \brief A paint effect which blurs a source picture, using a number of different blur
* methods.
*
* \note Added in version 2.9
*/
/************************************************************************
* 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
{
%TypeHeaderCode
#include <qgsblureffect.h>
%Docstring
A paint effect which blurs a source picture, using a number of different blur
methods.

.. versionadded:: 2.9
%End

%TypeHeaderCode
#include "qgsblureffect.h"
%End
public:

/** Available blur methods (algorithms) */
enum BlurMethod
{
StackBlur, /*!< stack blur, a fast but low quality blur. Valid blur level values are between 0 - 16.*/
GaussianBlur /*!< Gaussian blur, a slower but high quality blur. Blur level values are the distance in pixels for the blur operation. */
StackBlur,
GaussianBlur
};

/** Creates a new QgsBlurEffect effect from a properties string map.
* @param map encoded properties string map
* @returns new QgsBlurEffect
*/
static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/;
%Docstring
Creates a new QgsBlurEffect effect from a properties string map.
\param map encoded properties string map
:return: new QgsBlurEffect
:rtype: QgsPaintEffect
%End

QgsBlurEffect();
virtual ~QgsBlurEffect();

virtual QString type() const;
virtual QgsStringMap properties() const;
virtual void readProperties( const QgsStringMap &props );
virtual QgsBlurEffect *clone() const /Factory/;

/** Sets blur level (strength)
* @param level blur level. Depending on the current @link blurMethod @endlink, this parameter
* has different effects
* @see blurLevel
* @see blurMethod
*/
void setBlurLevel( const int level );
%Docstring
Sets blur level (strength)
\param level blur level. Depending on the current blurMethod(), this parameter
has different effects
.. seealso:: blurLevel
.. seealso:: blurMethod
%End

/** Returns the blur level (strength)
* @returns blur level. Depending on the current @link blurMethod @endlink, this parameter
* has different effects
* @see setBlurLevel
* @see blurMethod
*/
int blurLevel() const;
%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

/** Sets the blur method (algorithm) to use for performing the blur.
* @param method blur method
* @see blurMethod
*/
void setBlurMethod( const BlurMethod method );
%Docstring
Sets the blur method (algorithm) to use for performing the blur.
\param method blur method
.. seealso:: blurMethod
%End

/** Returns the blur method (algorithm) used for performing the blur.
* @returns blur method
* @see setBlurMethod
*/
BlurMethod blurMethod() const;
%Docstring
Returns the blur method (algorithm) used for performing the blur.
:return: blur method
.. seealso:: setBlurMethod
:rtype: BlurMethod
%End

/** Sets the transparency for the effect
* @param transparency double between 0 and 1 inclusive, where 0 is fully opaque
* and 1 is fully transparent
* @see transparency
*/
void setTransparency( const double transparency );
%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

/** Returns the transparency for the effect
* @returns transparency value between 0 and 1 inclusive, where 0 is fully opaque
* and 1 is fully transparent
* @see setTransparency
*/
double transparency() const;
%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

/** Sets the blend mode for the effect
* @param mode blend mode used for drawing the effect on to a destination
* paint device
* @see blendMode
*/
void setBlendMode( const QPainter::CompositionMode mode );
%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

/** Returns the blend mode for the effect
* @returns blend mode used for drawing the effect on to a destination
* paint device
* @see setBlendMode
*/
QPainter::CompositionMode blendMode() const;
%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

protected:

virtual void draw( QgsRenderContext &context );
virtual QRectF boundingRect( const QRectF &rect, const QgsRenderContext &context ) const;

};


/************************************************************************
* This file has been generated automatically from *
* *
* src/core/effects/qgsblureffect.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
Loading

0 comments on commit 09d3e2f

Please sign in to comment.