The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
gfx_blur.c File Reference

libgfx: a Gaussian blur of a whole buffer (a frosted backdrop). More...

#include "gfx.h"
#include <math.h>
#include <stdlib.h>

Functions

void gfx_blur (gfx_buffer_t *buf, double sigma)
 blur the whole buffer like a Gaussian with this sigma (in pixels); the edge pixels are used again past the edges.

Detailed Description

libgfx: a Gaussian blur of a whole buffer (a frosted backdrop).

three box blurs in each direction approximate the Gaussian (the SVG feGaussianBlur method, as for the masks of shadows). each channel of the premultiplied pixels is blurred. at the edges the edge pixel is used again, so the edges do not get dark.

Function Documentation

◆ gfx_blur()

void gfx_blur ( gfx_buffer_t * buf,
double sigma )

blur the whole buffer like a Gaussian with this sigma (in pixels); the edge pixels are used again past the edges.