2017-05-23 14:33:31 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/effects/qgsshadoweffect.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
class QgsShadowEffect : QgsPaintEffect
|
|
|
|
{
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
Base class for paint effects which offset, blurred shadows
|
2017-05-23 14:33:31 +02:00
|
|
|
|
|
|
|
.. versionadded:: 2.9
|
2015-03-28 20:03:37 +11:00
|
|
|
%End
|
|
|
|
|
2017-05-23 14:33:31 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsshadoweffect.h"
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
public:
|
|
|
|
|
|
|
|
QgsShadowEffect();
|
|
|
|
|
|
|
|
virtual QgsStringMap properties() const;
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual void readProperties( const QgsStringMap &props );
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2015-03-28 20:03:37 +11: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) for the shadow.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param level: blur level. Values between 0 and 16 are valid, with larger
|
2018-05-24 21:21:14 +10:00
|
|
|
values indicating greater blur strength.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`blurLevel`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
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) for the shadow.
|
|
|
|
|
|
|
|
:return: blur level. Value will be between 0 and 16, with larger
|
2018-05-24 21:21:14 +10:00
|
|
|
values indicating greater blur strength.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setBlurLevel`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
void setOffsetAngle( const int angle );
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the angle for offsetting the shadow.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param angle: offset angle in degrees clockwise from North
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetAngle`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetDistance`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
int offsetAngle() const;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the angle used for offsetting the shadow.
|
|
|
|
|
|
|
|
:return: offset angle in degrees clockwise from North
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetAngle`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetDistance`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
void setOffsetDistance( const double distance );
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the distance for offsetting the shadow.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param distance: offset distance. Units are specified via setOffsetUnit()
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetDistance`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetMapUnitScale`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
double offsetDistance() const;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the distance used for offsetting the shadow.
|
|
|
|
|
|
|
|
:return: offset distance. Distance units are retrieved via offsetUnit()
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetDistance`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetMapUnitScale`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2016-07-17 22:11:17 +10:00
|
|
|
void setOffsetUnit( const QgsUnitTypes::RenderUnit unit );
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the units used for the shadow offset distance.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param unit: units for offset distance
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetDistance`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetMapUnitScale`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2016-07-17 22:11:17 +10:00
|
|
|
QgsUnitTypes::RenderUnit offsetUnit() const;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the units used for the shadow offset distance.
|
|
|
|
|
|
|
|
:return: units for offset distance
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetUnit`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetDistance`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetMapUnitScale`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the map unit scale used for the shadow offset distance.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param scale: map unit scale for offset distance
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetMapUnitScale`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetDistance`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetUnit`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
const QgsMapUnitScale &offsetMapUnitScale() const;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the map unit scale used for the shadow offset distance.
|
|
|
|
|
|
|
|
:return: map unit scale for offset distance
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setOffsetMapUnitScale`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetDistance`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`offsetUnit`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setColor( const QColor &color );
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the color for the shadow.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param color: shadow color
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`color`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
QColor color() const;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the color used for the shadow.
|
|
|
|
|
|
|
|
:return: shadow color
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setColor`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2017-05-29 16:46:53 +10:00
|
|
|
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.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param opacity: double between 0 and 1 inclusive, where 0 is fully transparent
|
2018-05-24 21:21:14 +10:00
|
|
|
and 1 is fully opaque
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`opacity`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2017-05-29 16:46:53 +10:00
|
|
|
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
|
2018-05-24 21:21:14 +10:00
|
|
|
and 1 is fully opaque
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setOpacity`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
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
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param mode: blend mode used for drawing the effect on to a destination
|
2018-05-24 21:21:14 +10:00
|
|
|
paint device
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`blendMode`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
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
|
2018-05-24 21:21:14 +10:00
|
|
|
paint device
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setBlendMode`
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual QRectF boundingRect( const QRectF &rect, const QgsRenderContext &context ) const;
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual void draw( QgsRenderContext &context );
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2015-03-28 20:03:37 +11:00
|
|
|
virtual bool exteriorShadow() const = 0;
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Specifies whether the shadow is drawn outside the picture or within
|
|
|
|
the picture.
|
|
|
|
|
|
|
|
:return: true if shadow is to be drawn outside the picture, or false
|
2018-05-24 21:21:14 +10:00
|
|
|
to draw shadow within the picture
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
|
|
|
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class QgsDropShadowEffect : QgsShadowEffect
|
|
|
|
{
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
A paint effect which draws an offset and optionally blurred drop shadow
|
2017-05-23 14:33:31 +02:00
|
|
|
|
|
|
|
.. versionadded:: 2.9
|
2015-03-28 20:03:37 +11:00
|
|
|
%End
|
|
|
|
|
2017-05-23 14:33:31 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsshadoweffect.h"
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
public:
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
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 QgsDropShadowEffect effect from a properties string map.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param map: encoded properties string map
|
|
|
|
|
|
|
|
:return: new QgsDropShadowEffect
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
QgsDropShadowEffect();
|
|
|
|
|
|
|
|
virtual QString type() const;
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual QgsDropShadowEffect *clone() const /Factory/;
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2015-03-28 20:03:37 +11:00
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual bool exteriorShadow() const;
|
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2015-03-28 20:03:37 +11:00
|
|
|
};
|
|
|
|
|
|
|
|
class QgsInnerShadowEffect : QgsShadowEffect
|
|
|
|
{
|
2017-05-23 14:33:31 +02:00
|
|
|
%Docstring
|
2018-05-26 14:10:30 +10:00
|
|
|
A paint effect which draws an offset and optionally blurred drop shadow
|
2017-12-15 10:36:55 -04:00
|
|
|
within a picture.
|
2017-05-23 14:33:31 +02:00
|
|
|
|
|
|
|
.. versionadded:: 2.9
|
2015-03-28 20:03:37 +11:00
|
|
|
%End
|
|
|
|
|
2017-05-23 14:33:31 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsshadoweffect.h"
|
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
public:
|
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
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 QgsInnerShadowEffect effect from a properties string map.
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param map: encoded properties string map
|
|
|
|
|
|
|
|
:return: new QgsInnerShadowEffect
|
2017-05-23 14:33:31 +02:00
|
|
|
%End
|
2015-03-28 20:03:37 +11:00
|
|
|
|
|
|
|
QgsInnerShadowEffect();
|
|
|
|
|
|
|
|
virtual QString type() const;
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
virtual QgsInnerShadowEffect *clone() const /Factory/;
|
2015-03-28 20:03:37 +11:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2015-03-28 20:03:37 +11:00
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual bool exteriorShadow() const;
|
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
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/qgsshadoweffect.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|