diff options
Diffstat (limited to 'doc/src/qtgraphicaleffects-fastblur.qdoc')
-rw-r--r-- | doc/src/qtgraphicaleffects-fastblur.qdoc | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/doc/src/qtgraphicaleffects-fastblur.qdoc b/doc/src/qtgraphicaleffects-fastblur.qdoc new file mode 100644 index 0000000..6ebc344 --- /dev/null +++ b/doc/src/qtgraphicaleffects-fastblur.qdoc @@ -0,0 +1,165 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Graphical Effects module. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms +** and conditions contained in a signed written agreement between you +** and Nokia. +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \qmlclass FastBlur + \inqmlmodule QtGraphicalEffects + \brief Applies a fast blur effect to one or more source items. + + FastBlur offers lower blur quality than \l + {QtGraphicalEffects::GaussianBlur} {GaussianBlur}, but it is faster to + render. The FastBlur effect softens the source content by blurring it with + algorithm which uses the source content downscaling and bilinear filtering. + Use this effect in situations where the source content is rapidly changing + and the highest possible blur quality is not + needed. + + \table + \header + \o Source + \o Effect applied + \row + \o \image Original_bug.png + \o \image FastBlur_bug.png + \endtable + + \section1 Example + + The following example shows how to apply the effect. + \snippet snippets/FastBlur-example.qml example + + \section1 Memory Consumption + + The internal memory consumption is approximately twice the memory + consumption of the the source item area in pixels. + If source item is not Image or ShaderEffectSource, then effect internally creates one ShaderEffectSource item per source. + Enabling the effect cache increases the memory consumption because an extra + buffer is allocated for the effect output. + + \table + \header + \o Estimated memory usage for an effect with a size of 640x480 pixels with 32 bits per pixel (bpp) + \o + \row + \o Effect internal + \o 2.4 MB + \row + \o ShaderEffectSource (if used) + \o 1.2 MB + \row + \o Effect internal cache (if enabled) + \o 1.2 MB + \row + \o TOTAL (max) + \o 4.8 MB + \endtable + +*/ + +/*! + \qmlproperty variant QtGraphicalEffects::FastBlur::source + + This property defines the source item that is going to be blurred. + +*/ +/*! + \qmlproperty real QtGraphicalEffects::FastBlur::blur + + BlurLevel defines the level of blurring, value 0.0 represents the source as + unblurred and value 1.0 blurs the source maximally. + + The value ranges from 0.0 (no blur) to 1.0 (maximum blur). By default, the + property is set to \c 0.0 (no blur). + + \table + \header + \o Output examples with different blur values + \o + \o + \row + \o \image FastBlur_blur1.png + \o \image FastBlur_blur2.png + \o \image FastBlur_blur3.png + \row + \o \bold { blur: 0.0 } + \o \bold { blur: 0.5 } + \o \bold { blur: 1.0 } + \endtable +*/ + +/*! + \qmlproperty bool QtGraphicalEffects::FastBlur::transparentBorder + + This property defines the blur near the edges of the item, where the pixel + blurring is affected by the pixels just outside the source. + + Setting this property to \c false, interprets the pixels outside the item + according to the OpenGL clamp-to-edge mode. If the source is Image, the pixels + are interpreted according to the Image::fillMode property. If the source is + ShaderEffectSource, the pixels are interpreted according to the + ShaderEffectSource::wrapMode property. + + Setting this property to \c true, interprets the pixels outside the item to + be transparent. This behavior is similar to the OpenGL clamp-to-border + extension. The blur is expanded slightly outside the effect item area. + + By default, the property is set to \c false. + + \table + \header + \o Output examples with different transparentBorder values + \o + \o + \row + \o \image FastBlur_transparentBorder1.png + \o \image FastBlur_transparentBorder2.png + \row + \o \bold { transparentBorder: false } + \o \bold { transparentBorder: true } + \row + \o \l blur: 1 + \o \l blur: 1 + \endtable + +*/ + +/*! + \qmlproperty bool QtGraphicalEffects::FastBlur::cached + + This property allows the effect output pixels to be cached in order to + improve the rendering performance. + + Every time the source or effect properties are changed, the pixels in the + cache must be updated. Memory consumption is increased, because an extra + buffer of memory is required for storing the effect output. + + It is recommended to disable the cache when the source or the effect + properties are animated. + + By default, the property is set to \c false. + +*/ |