File: qgstransformeffect.sip

package info (click to toggle)
qgis 2.18.28%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,007,948 kB
  • sloc: cpp: 671,774; python: 158,539; xml: 35,690; ansic: 8,346; sh: 1,766; perl: 1,669; sql: 999; yacc: 836; lex: 461; makefile: 292
file content (203 lines) | stat: -rw-r--r-- 5,724 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
/** \ingroup core
 * \class QgsTransformEffect
 * \brief A paint effect which applies transformations (such as move,
 * scale and rotate) to a picture.
 *
 * \note Added in version 2.9
 */

class QgsTransformEffect : QgsPaintEffect
{
%TypeHeaderCode
#include <qgstransformeffect.h>
%End

  public:

    /** Creates a new QgsTransformEffect effect from a properties string map.
     * @param map encoded properties string map
     * @returns new QgsTransformEffect
     */
    static QgsPaintEffect* create( const QgsStringMap& map ) /Factory/;

    QgsTransformEffect();
    virtual ~QgsTransformEffect();

    virtual QString type() const;
    virtual QgsStringMap properties() const;
    virtual void readProperties( const QgsStringMap& props );
    virtual QgsTransformEffect* clone() const /Factory/;

    /** Sets the transform x translation.
     * @param translateX distance to translate along the x axis
     * @see translateX
     * @see setTranslateY
     * @see setTranslateUnit
     * @see setTranslateMapUnitScale
     */
    void setTranslateX( const double translateX );

    /** Returns the transform x translation.
     * @returns X distance translated along the x axis
     * @see setTranslateX
     * @see translateY
     * @see translateUnit
     * @see translateMapUnitScale
     */
    double translateX() const;

    /** Sets the transform y translation.
     * @param translateY distance to translate along the y axis
     * @see translateY
     * @see setTranslateX
     * @see setTranslateUnit
     * @see setTranslateMapUnitScale
     */
    void setTranslateY( const double translateY );

    /** Returns the transform y translation.
     * @returns Y distance translated along the y axis
     * @see setTranslateY
     * @see translateX
     * @see translateUnit
     * @see translateMapUnitScale
     */
    double translateY() const;

    /** Sets the units used for the transform translation.
     * @param unit units for translation
     * @see translateUnit
     * @see setTranslateX
     * @see setTranslateY
     * @see setTranslateMapUnitScale
     */
    void setTranslateUnit( const QgsSymbolV2::OutputUnit unit );

    /** Returns the units used for the transform translation.
     * @returns units for translation
     * @see setTranslateUnit
     * @see translateX
     * @see translateY
     * @see translateMapUnitScale
     */
    QgsSymbolV2::OutputUnit translateUnit() const;

    /** Sets the map unit scale used for the transform translation.
     * @param scale map unit scale for translation
     * @see translateMapUnitScale
     * @see setTranslateX
     * @see setTranslateY
     * @see setTranslateUnit
     */
    void setTranslateMapUnitScale( const QgsMapUnitScale& scale );

    /** Returns the map unit scale used for the transform translation.
     * @returns map unit scale for translation
     * @see setTranslateMapUnitScale
     * @see translateX
     * @see translateY
     * @see translateUnit
     */
    const QgsMapUnitScale& translateMapUnitScale() const;

    /** Sets the x axis scaling factor.
     * @param scaleX factor to scale x axis by, where 1.0 = no scaling
     * @see scaleX
     * @see setScaleY
     */
    void setScaleX( const double scaleX );

    /** Returns the x axis scaling factor.
     * @returns x axis scaling factor, where 1.0 = no scaling
     * @see setScaleX
     * @see scaleY
     */
    double scaleX() const;

    /** Sets the y axis scaling factor.
     * @param scaleY factor to scale y axis by, where 1.0 = no scaling
     * @see scaleX
     */
    void setScaleY( const double scaleY );

    /** Returns the y axis scaling factor.
     * @returns y axis scaling factor, where 1.0 = no scaling
     * @see setScaleY
     * @see scaleX
     */
    double scaleY() const;

    /** Sets the transform rotation.
     * @param rotation degrees to rotate, clockwise
     * @see rotation
     */
    void setRotation( const double rotation );

    /** Returns the transform rotation.
     * @returns rotation in degrees clockwise
     * @see setRotation
     */
    double rotation() const;

    /** Sets the x axis shearing factor.
     * @param shearX x axis shearing
     * @see shearX
     * @see setShearY
     */
    void setShearX( const double shearX );

    /** Returns the x axis shearing factor.
     * @returns x axis shearing
     * @see setShearX
     * @see shearY
     */
    double shearX() const;

    /** Sets the y axis shearing factor.
     * @param shearY y axis shearing
     * @see shearY
     * @see setShearX
     */
    void setShearY( const double shearY );

    /** Returns the y axis shearing factor.
     * @returns y axis shearing
     * @see setShearY
     * @see shearX
     */
    double shearY() const;

    /** Sets whether to reflect along the x-axis
     * @param reflectX true to reflect horizontally
     * @see reflectX
     * @see setReflectY
     */
    void setReflectX( const bool reflectX );

    /** Returns whether transform will be reflected along the x-axis
     * @returns true if transform will reflect horizontally
     * @see setReflectX
     * @see reflectY
     */
    bool reflectX() const;

    /** Sets whether to reflect along the y-axis
     * @param reflectY true to reflect horizontally
     * @see reflectY
     * @see setReflectX
     */
    void setReflectY( const bool reflectY );

    /** Returns whether transform will be reflected along the y-axis
     * @returns true if transform will reflect horizontally
     * @see setReflectY
     * @see reflectX
     */
    bool reflectY() const;

  protected:

    virtual void draw( QgsRenderContext& context );
    virtual QRectF boundingRect( const QRectF& rect, const QgsRenderContext& context ) const;

};