MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / applyBoxBlur

Function applyBoxBlur

app/src/UI/Widgets/PainterContext.cpp:1776–1785  ·  view source on GitHub ↗

* @brief Three-pass separable box-blur applied in place to the given image. */

Source from the content-addressed store, hash-verified

1774 * @brief Three-pass separable box-blur applied in place to the given image.
1775 */
1776static void applyBoxBlur(QImage& image, int radius)
1777{
1778 for (int pass = 0; pass < 3; ++pass) {
1779 QImage blurred(image.size(), QImage::Format_ARGB32_Premultiplied);
1780 blurred.fill(Qt::transparent);
1781 boxBlurHorizontal(image, blurred, radius);
1782 image.fill(Qt::transparent);
1783 boxBlurVertical(blurred, image, radius);
1784 }
1785}
1786
1787/**
1788 * @brief Renders the given draw callback as a coloured drop shadow.

Callers 1

renderWithShadowMethod · 0.85

Calls 4

boxBlurHorizontalFunction · 0.85
boxBlurVerticalFunction · 0.85
sizeMethod · 0.45
fillMethod · 0.45

Tested by

no test coverage detected