-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,557 additions
and
1,101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 * | ||
************************************************************************/ |
Oops, something went wrong.