AUI Framework  master
Cross-platform base for C++ UI apps
Loading...
Searching...
No Matches
ass::Backdrop::GaussianBlurCustom Struct Reference

Underlying type of GaussianBlur but with customizable downscale. Generally, use GaussianBlur.

#include <AUI/ASS/Property/Backdrop.h>

Public Member Functions#

bool operator== (const GaussianBlurCustom &) const =default
 

Signals and public fields#

AMetric radius = 6_dp
 blur radius.
 
int downscale = 1
 downscale factor. =1 equals don't affect. Must be positive.
 

Member Data Documentation#

◆ downscale#

int ass::Backdrop::GaussianBlurCustom::downscale = 1

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.

view with_style {
  Backdrop { Backdrop::GaussianBlur { .radius = 6_dp, .downscale = 4 } },
}
#define with_style
Allows to define a style to the view right in place.
Definition kAUI.h:287
Fast gaussian blur.
Definition Backdrop.h:84

is visually approximately same as

view with_style {
  Backdrop { Backdrop::GaussianBlur { .radius = 24_dp } },
}

but 16 times cheaper.

◆ radius#

AMetric ass::Backdrop::GaussianBlurCustom::radius = 6_dp

Performance costs of radius is O^2. Please use downscale factor to approximate large blur radius.