17 #ifndef QGSSHADOWEFFECT_H 18 #define QGSSHADOWEFFECT_H 150 void setBlendMode(
const QPainter::CompositionMode mode ) { mBlendMode = mode; }
157 QPainter::CompositionMode
blendMode()
const {
return mBlendMode; }
169 virtual bool exteriorShadow()
const = 0;
242 #endif // QGSSHADOWEFFECT_H virtual bool exteriorShadow() const override
Specifies whether the shadow is drawn outside the picture or within the picture.
void setOffsetDistance(const double distance)
Sets the distance for offsetting the shadow.
OutputUnit
The unit of the output.
virtual QgsStringMap properties() const =0
Returns the properties describing the paint effect encoded in a string format.
void setOffsetAngle(const int angle)
Sets the angle for offsetting the shadow.
virtual QString type() const override
Returns the effect type.
double offsetDistance() const
Returns the distance used for offsetting the shadow.
Base class for visual effects which can be applied to QPicture drawings.
void setBlurLevel(const int level)
Sets blur level (strength) for the shadow.
void setOffsetUnit(const QgsSymbolV2::OutputUnit unit)
Sets the units used for the shadow offset distance.
virtual QgsPaintEffect * clone() const =0
Duplicates an effect by creating a deep copy of the effect.
QPainter::CompositionMode blendMode() const
Returns the blend mode for the effect.
QgsMapUnitScale mOffsetMapUnitScale
QColor color() const
Returns the color used for the shadow.
virtual QString type() const override
Returns the effect type.
QPainter::CompositionMode mBlendMode
int blurLevel() const
Returns the blur level (strength) for the shadow.
double transparency() const
Returns the transparency for the effect.
A paint effect which draws an offset and optionally blurred drop shadow.
double ANALYSIS_EXPORT angle(Point3D *p1, Point3D *p2, Point3D *p3, Point3D *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
virtual void readProperties(const QgsStringMap &props)=0
Reads a string map of an effect's properties and restores the effect to the state described by the pr...
A paint effect which draws an offset and optionally blurred drop shadow within a picture.
void setOffsetMapUnitScale(const QgsMapUnitScale &scale)
Sets the map unit scale used for the shadow offset distance.
Contains information about the context of a rendering operation.
virtual QRectF boundingRect(const QRectF &rect, const QgsRenderContext &context) const
Returns the bounding rect required for drawing the effect.
Struct for storing maximum and minimum scales for measurements in map units.
void setBlendMode(const QPainter::CompositionMode mode)
Sets the blend mode for the effect.
QgsSymbolV2::OutputUnit mOffsetUnit
virtual bool exteriorShadow() const override
Specifies whether the shadow is drawn outside the picture or within the picture.
Base class for paint effects which offset, blurred shadows.
QgsSymbolV2::OutputUnit offsetUnit() const
Returns the units used for the shadow offset distance.
virtual void draw(QgsRenderContext &context)=0
Handles drawing of the effect's result on to the specified render context.
void setColor(const QColor &color)
Sets the color for the shadow.
int offsetAngle() const
Returns the angle used for offsetting the shadow.
void setTransparency(const double transparency)
Sets the transparency for the effect.
const QgsMapUnitScale & offsetMapUnitScale() const
Returns the map unit scale used for the shadow offset distance.