1/************************************************************************ 2 * This file has been generated automatically from * 3 * * 4 * src/core/effects/qgsshadoweffect.h * 5 * * 6 * Do not edit manually ! Edit header and run scripts/sipify.pl again * 7 ************************************************************************/ 8 9 10 11 12class QgsShadowEffect : QgsPaintEffect /NoDefaultCtors/ 13{ 14%Docstring 15Base class for paint effects which offset, blurred shadows 16 17.. versionadded:: 2.9 18%End 19 20%TypeHeaderCode 21#include "qgsshadoweffect.h" 22%End 23 public: 24 25 QgsShadowEffect(); 26 27 virtual QgsStringMap properties() const; 28 29 virtual void readProperties( const QgsStringMap &props ); 30 31 32 void setBlurLevel( const double level ); 33%Docstring 34Sets blur level (radius) for the shadow. 35 36:param level: blur level. 37 values indicating greater blur strength. 38 39.. seealso:: :py:func:`blurLevel` 40 41.. seealso:: :py:func:`setBlurUnit` 42 43.. seealso:: :py:func:`setBlurMapUnitScale` 44%End 45 46 double blurLevel() const; 47%Docstring 48Returns the blur level (radius) for the shadow. 49 50:return: blur level. 51 values indicating greater blur strength. 52 53.. seealso:: :py:func:`setBlurLevel` 54 55.. seealso:: :py:func:`blurUnit` 56 57.. seealso:: :py:func:`blurMapUnitScale` 58%End 59 60 void setBlurUnit( const QgsUnitTypes::RenderUnit unit ); 61%Docstring 62Sets the units used for the shadow blur level (radius). 63 64:param unit: units for blur level 65 66.. seealso:: :py:func:`blurUnit` 67 68.. seealso:: :py:func:`setBlurLevel` 69 70.. seealso:: :py:func:`setBlurMapUnitScale` 71 72.. versionadded:: 3.4.9 73%End 74 75 QgsUnitTypes::RenderUnit blurUnit() const; 76%Docstring 77Returns the units used for the shadow blur level (radius). 78 79:return: units for blur level 80 81.. seealso:: :py:func:`setBlurUnit` 82 83.. seealso:: :py:func:`blurLevel` 84 85.. seealso:: :py:func:`blurMapUnitScale` 86 87.. versionadded:: 3.4.9 88%End 89 90 void setBlurMapUnitScale( const QgsMapUnitScale &scale ); 91%Docstring 92Sets the map unit scale used for the shadow blur strength (radius). 93 94:param scale: map unit scale for blur strength 95 96.. seealso:: :py:func:`blurMapUnitScale` 97 98.. seealso:: :py:func:`setBlurLevel` 99 100.. seealso:: :py:func:`setBlurUnit` 101 102.. versionadded:: 3.4.9 103%End 104 105 const QgsMapUnitScale &blurMapUnitScale() const; 106%Docstring 107Returns the map unit scale used for the shadow blur strength (radius). 108 109:return: map unit scale for blur strength 110 111.. seealso:: :py:func:`setBlurMapUnitScale` 112 113.. seealso:: :py:func:`blurLevel` 114 115.. seealso:: :py:func:`blurUnit` 116 117.. versionadded:: 3.4.9 118%End 119 120 void setOffsetAngle( const int angle ); 121%Docstring 122Sets the angle for offsetting the shadow. 123 124:param angle: offset angle in degrees clockwise from North 125 126.. seealso:: :py:func:`offsetAngle` 127 128.. seealso:: :py:func:`setOffsetDistance` 129%End 130 131 int offsetAngle() const; 132%Docstring 133Returns the angle used for offsetting the shadow. 134 135:return: offset angle in degrees clockwise from North 136 137.. seealso:: :py:func:`setOffsetAngle` 138 139.. seealso:: :py:func:`offsetDistance` 140%End 141 142 void setOffsetDistance( const double distance ); 143%Docstring 144Sets the distance for offsetting the shadow. 145 146:param distance: offset distance. Units are specified via :py:func:`~QgsShadowEffect.setOffsetUnit` 147 148.. seealso:: :py:func:`offsetDistance` 149 150.. seealso:: :py:func:`setOffsetUnit` 151 152.. seealso:: :py:func:`setOffsetMapUnitScale` 153%End 154 155 double offsetDistance() const; 156%Docstring 157Returns the distance used for offsetting the shadow. 158 159:return: offset distance. Distance units are retrieved via :py:func:`~QgsShadowEffect.offsetUnit` 160 161.. seealso:: :py:func:`setOffsetDistance` 162 163.. seealso:: :py:func:`offsetUnit` 164 165.. seealso:: :py:func:`offsetMapUnitScale` 166%End 167 168 void setOffsetUnit( const QgsUnitTypes::RenderUnit unit ); 169%Docstring 170Sets the units used for the shadow offset distance. 171 172:param unit: units for offset distance 173 174.. seealso:: :py:func:`offsetUnit` 175 176.. seealso:: :py:func:`setOffsetDistance` 177 178.. seealso:: :py:func:`setOffsetMapUnitScale` 179%End 180 181 QgsUnitTypes::RenderUnit offsetUnit() const; 182%Docstring 183Returns the units used for the shadow offset distance. 184 185:return: units for offset distance 186 187.. seealso:: :py:func:`setOffsetUnit` 188 189.. seealso:: :py:func:`offsetDistance` 190 191.. seealso:: :py:func:`offsetMapUnitScale` 192%End 193 194 void setOffsetMapUnitScale( const QgsMapUnitScale &scale ); 195%Docstring 196Sets the map unit scale used for the shadow offset distance. 197 198:param scale: map unit scale for offset distance 199 200.. seealso:: :py:func:`offsetMapUnitScale` 201 202.. seealso:: :py:func:`setOffsetDistance` 203 204.. seealso:: :py:func:`setOffsetUnit` 205%End 206 207 const QgsMapUnitScale &offsetMapUnitScale() const; 208%Docstring 209Returns the map unit scale used for the shadow offset distance. 210 211:return: map unit scale for offset distance 212 213.. seealso:: :py:func:`setOffsetMapUnitScale` 214 215.. seealso:: :py:func:`offsetDistance` 216 217.. seealso:: :py:func:`offsetUnit` 218%End 219 220 void setColor( const QColor &color ); 221%Docstring 222Sets the color for the shadow. 223 224:param color: shadow color 225 226.. seealso:: :py:func:`color` 227%End 228 229 QColor color() const; 230%Docstring 231Returns the color used for the shadow. 232 233:return: shadow color 234 235.. seealso:: :py:func:`setColor` 236%End 237 238 void setOpacity( const double opacity ); 239%Docstring 240Sets the ``opacity`` for the effect. 241 242:param opacity: double between 0 and 1 inclusive, where 0 is fully transparent 243 and 1 is fully opaque 244 245.. seealso:: :py:func:`opacity` 246%End 247 248 double opacity() const; 249%Docstring 250Returns the opacity for the effect. 251 252:return: opacity value between 0 and 1 inclusive, where 0 is fully transparent 253 and 1 is fully opaque 254 255.. seealso:: :py:func:`setOpacity` 256%End 257 258 void setBlendMode( const QPainter::CompositionMode mode ); 259%Docstring 260Sets the blend mode for the effect 261 262:param mode: blend mode used for drawing the effect on to a destination 263 paint device 264 265.. seealso:: :py:func:`blendMode` 266%End 267 268 QPainter::CompositionMode blendMode() const; 269%Docstring 270Returns the blend mode for the effect 271 272:return: blend mode used for drawing the effect on to a destination 273 paint device 274 275.. seealso:: :py:func:`setBlendMode` 276%End 277 278 protected: 279 280 virtual QRectF boundingRect( const QRectF &rect, const QgsRenderContext &context ) const; 281 282 virtual void draw( QgsRenderContext &context ); 283 284 285 virtual bool exteriorShadow() const = 0; 286%Docstring 287Specifies whether the shadow is drawn outside the picture or within 288the picture. 289 290:return: ``True`` if shadow is to be drawn outside the picture, or ``False`` 291 to draw shadow within the picture 292%End 293 294 295}; 296 297 298class QgsDropShadowEffect : QgsShadowEffect /NoDefaultCtors/ 299{ 300%Docstring 301A paint effect which draws an offset and optionally blurred drop shadow 302 303.. versionadded:: 2.9 304%End 305 306%TypeHeaderCode 307#include "qgsshadoweffect.h" 308%End 309 public: 310 311 static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; 312%Docstring 313Creates a new QgsDropShadowEffect effect from a properties string map. 314 315:param map: encoded properties string map 316 317:return: new QgsDropShadowEffect 318%End 319 320 QgsDropShadowEffect(); 321 322 virtual QString type() const; 323 324 virtual QgsDropShadowEffect *clone() const /Factory/; 325 326 327 protected: 328 329 virtual bool exteriorShadow() const; 330 331 332}; 333 334class QgsInnerShadowEffect : QgsShadowEffect /NoDefaultCtors/ 335{ 336%Docstring 337A paint effect which draws an offset and optionally blurred drop shadow 338within a picture. 339 340.. versionadded:: 2.9 341%End 342 343%TypeHeaderCode 344#include "qgsshadoweffect.h" 345%End 346 public: 347 348 static QgsPaintEffect *create( const QgsStringMap &map ) /Factory/; 349%Docstring 350Creates a new QgsInnerShadowEffect effect from a properties string map. 351 352:param map: encoded properties string map 353 354:return: new QgsInnerShadowEffect 355%End 356 357 QgsInnerShadowEffect(); 358 359 virtual QString type() const; 360 361 virtual QgsInnerShadowEffect *clone() const /Factory/; 362 363 364 protected: 365 366 virtual bool exteriorShadow() const; 367 368 369}; 370 371 372/************************************************************************ 373 * This file has been generated automatically from * 374 * * 375 * src/core/effects/qgsshadoweffect.h * 376 * * 377 * Do not edit manually ! Edit header and run scripts/sipify.pl again * 378 ************************************************************************/ 379