71 props.
insert(
"reflect_x", mReflectX ?
"1" :
"0" );
72 props.
insert(
"reflect_y", mReflectY ?
"1" :
"0" );
91 mReflectX = props.
value(
"reflect_x",
"0" ).toInt();
92 mReflectY = props.
value(
"reflect_y",
"0" ).toInt();
93 mScaleX = props.
value(
"scale_x",
"1.0" ).toDouble();
94 mScaleY = props.
value(
"scale_y",
"1.0" ).toDouble();
95 mRotation = props.
value(
"rotation",
"0.0" ).toDouble();
96 mTranslateX = props.
value(
"translate_x",
"0.0" ).toDouble();
97 mTranslateY = props.
value(
"translate_y",
"0.0" ).toDouble();
134 t.
translate( translateX + left + width / 2.0,
135 translateY + top + height / 2.0 );
138 t.
shear( mShearX, mShearY );
139 t.
scale( mScaleX, mScaleY );
141 if ( mReflectX || mReflectY )
143 t.
scale( mReflectX ? -1 : 1, mReflectY ? -1 : 1 );
147 -top - height / 2.0 );
static QString encodeOutputUnit(QgsSymbolV2::OutputUnit unit)
QRect boundingRect() const
bool enabled() const
Returns whether the effect is enabled.
Base class for visual effects which can be applied to QPicture drawings.
static QString encodeMapUnitScale(const QgsMapUnitScale &mapUnitScale)
static double pixelSizeScaleFactor(const QgsRenderContext &c, QgsSymbolV2::OutputUnit u, const QgsMapUnitScale &scale=QgsMapUnitScale())
Returns scale factor painter units -> pixel dimensions.
static QgsSymbolV2::OutputUnit decodeOutputUnit(const QString &str)
QString number(int n, int base)
DrawMode
Drawing modes for effects.
Contains information about the context of a rendering operation.
void drawSource(QPainter &painter)
Draws the source QPicture onto the specified painter.
iterator insert(const Key &key, const T &value)
const QPicture * source() const
Returns the source QPicture.
static QgsMapUnitScale decodeMapUnitScale(const QString &str)
const T value(const Key &key) const