* @brief Three-pass separable box-blur applied in place to the given image. */
| 1774 | * @brief Three-pass separable box-blur applied in place to the given image. |
| 1775 | */ |
| 1776 | static 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. |
no test coverage detected