Rectangle kernels

Replace conv::size with conv::{w,h}.

Shadow kernels are still squares, though.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-02-17 21:54:35 +00:00
parent cea010afec
commit b2750b26e0
4 changed files with 32 additions and 32 deletions

View File

@ -71,7 +71,9 @@ xcb_image_t *make_shadow(xcb_connection_t *c, const conv *kernel,
*/
xcb_image_t *ximage;
const double *shadow_sum = kernel->rsum;
int d = kernel->size, r = d / 2;
// We only support square kernels for shadow
assert(kernel->w == kernel->h);
int d = kernel->w, r = d / 2;
int swidth = width + r * 2, sheight = height + r * 2;
assert(d % 2 == 1);