ass::Backdrop#
Represents backdrop filter effect which applied to the pixels behind the view (i.e., blur, grayscale, etc.)
| Header: | #include <AUI/ASS/Property/Backdrop.h> |
| CMake: | aui_link(my_target PUBLIC aui::views) |
Detailed Description#
Matches CSS property backdrop-filter.
Because the effect is applied to everything behind the view, to see the effect the view's background needs to be transparent or partially transparent.
Examples#
Public Types#
GaussianBlurCustom#
struct ass::Backdrop::GaussianBlurCustom
Underlying type of GaussianBlur but with customizable downscale. Generally, use GaussianBlur.
AMetric radius- blur radius. Performance costs of radius is O^2. Please use downscale factor to approximate large blur radius.
int downscale-
downscale factor. =1 equals don't affect. Must be positive.
Effective blur radius is
radius * downscale. However, the downscale part is done by cheap downscaling of the framebuffer texture. Thus, by raising downscale factor you can achieve larger blur radius with approximately same visual result. Performance benefit of downscale factor { .radius = 6_dp, .downscale = x } in comparison to { .radius = 6_dp * x, .downscale = 1 } is x^2.is visually approximately same asview AUI_WITH_STYLE { Backdrop { Backdrop::GaussianBlur { .radius = 6_dp, .downscale = 4 } }, }but 16 times cheaper.view AUI_WITH_STYLE { Backdrop { Backdrop::GaussianBlur { .radius = 24_dp } }, } bool operatorconst = default
GaussianBlur#
struct ass::Backdrop::GaussianBlur
Fast gaussian blur. Strictly speaking, it's not an actual gaussian blur but a faster implementation of it.
GaussianBlur calculates best downscale parameter applicable for passed radius.
Downscale factor allows to produce approximately same visual result at drastically lower cost. You can use GaussianBlurCustom directly to specify your downscale factor.
AMetric radius
LiquidFluid#
struct ass::Backdrop::LiquidFluid
Empty structure.