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