bgo#634324 - Gaussian blur with negative-scaling transformation matrix is not rendered

When we figure out the standard deviations for Gaussian blurs, we were
simply multiplying the given values by the scaling factors in the current
transformation.  But if this is a negative-scaling matrix, we'd get
negative values, and we would not do a blur at all.

Take the absolute value of the scaled factors instead.

https://bugzilla.gnome.org/show_bug.cgi?id=634324
parent f7e0d256
......@@ -1902,7 +1902,7 @@ rsvg_filter_primitive_gaussian_blur_render (RsvgNode *node, RsvgFilterPrimitive
int width, height;
cairo_surface_t *output, *in;
RsvgIRect boundarys;
gfloat sdx, sdy;
gdouble sdx, sdy;
RsvgFilterPrimitiveOutput op;
cairo_t *cr;
......@@ -1922,8 +1922,8 @@ rsvg_filter_primitive_gaussian_blur_render (RsvgNode *node, RsvgFilterPrimitive
}
/* scale the SD values */
sdx = gaussian->sdx * ctx->paffine.xx;
sdy = gaussian->sdy * ctx->paffine.yy;
sdx = fabs (gaussian->sdx * ctx->paffine.xx);
sdy = fabs (gaussian->sdy * ctx->paffine.yy);
gaussian_blur_surface (in, output, sdx, sdy);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment