17#ifndef QGSSHADOWEFFECT_H
18#define QGSSHADOWEFFECT_H
178 void setColor(
const QColor &color ) { mColor = color; }
185 QColor
color()
const {
return mColor; }
193 void setOpacity(
const double opacity ) { mOpacity = opacity; }
209 void setBlendMode(
const QPainter::CompositionMode mode ) { mBlendMode = mode; }
217 QPainter::CompositionMode
blendMode()
const {
return mBlendMode; }
232 double mBlurLevel = 2.645;
235 int mOffsetAngle = 135;
236 double mOffsetDist = 2.0;
239 double mOpacity = 1.0;
241 QPainter::CompositionMode mBlendMode = QPainter::CompositionMode_Multiply;
266 QString
type()
const override;
271 bool exteriorShadow()
const override;
296 QString
type()
const override;
301 bool exteriorShadow()
const override;
RenderUnit
Rendering size units.
@ Millimeters
Millimeters.
A paint effect which draws an offset and optionally blurred drop shadow.
A paint effect which draws an offset and optionally blurred drop shadow within a picture.
Struct for storing maximum and minimum scales for measurements in map units.
Base class for visual effects which can be applied to QPicture drawings.
virtual void readProperties(const QVariantMap &props)=0
Reads a string map of an effect's properties and restores the effect to the state described by the pr...
virtual QgsPaintEffect * clone() const =0
Duplicates an effect by creating a deep copy of the effect.
virtual QRectF boundingRect(const QRectF &rect, const QgsRenderContext &context) const
Returns the bounding rect required for drawing the effect.
virtual QVariantMap properties() const =0
Returns the properties describing the paint effect encoded in a string format.
virtual void draw(QgsRenderContext &context)=0
Handles drawing of the effect's result on to the specified render context.
virtual QString type() const =0
Returns the effect type.
Contains information about the context of a rendering operation.
Base class for paint effects which render offset, blurred shadows.
int offsetAngle() const
Returns the angle used for offsetting the shadow.
void setOffsetAngle(const int angle)
Sets the angle for offsetting the shadow.
void setOpacity(const double opacity)
Sets the opacity for the effect.
void setColor(const QColor &color)
Sets the color for the shadow.
double opacity() const
Returns the opacity for the effect.
Qgis::RenderUnit offsetUnit() const
Returns the units used for the shadow offset distance.
QColor color() const
Returns the color used for the shadow.
virtual bool exteriorShadow() const =0
Specifies whether the shadow is drawn outside the picture or within the picture.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
Qgis::RenderUnit blurUnit() const
Returns the units used for the shadow blur level (radius).
void setBlurLevel(const double level)
Sets blur level (radius) for the shadow.
void setOffsetUnit(const Qgis::RenderUnit unit)
Sets the units used for the shadow offset distance.
void setOffsetDistance(const double distance)
Sets the distance for offsetting the shadow.
QgsMapUnitScale mOffsetMapUnitScale
double blurLevel() const
Returns the blur level (radius) for the shadow.
void setBlurUnit(const Qgis::RenderUnit unit)
Sets the units used for the shadow blur level (radius).
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale used for the shadow offset distance.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the shadow offset distance.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
double offsetDistance() const
Returns the distance used for offsetting the shadow.
QgsMapUnitScale mBlurMapUnitScale
const QgsMapUnitScale & blurMapUnitScale() const
Returns the map unit scale used for the shadow blur strength (radius).
void setBlurMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the shadow blur strength (radius).
#define SIP_NODEFAULTCTORS