rsvg_filter_fix_coordinate_system (RsvgFilterContext * ctx, RsvgState * state, RsvgBbox bbox)
{
    int x, y, height, width;
    int i;

    x = bbox.x;
    y = bbox.y;
    width = bbox.w;
    height = bbox.h;

    ctx->width = gdk_pixbuf_get_width (ctx->source);
    ctx->height = gdk_pixbuf_get_height (ctx->source);

    for (i = 0; i < 6; i++)
        ctx->affine[i] = state->affine[i];
    if (ctx->filter->filterunits == objectBoundingBox) {
        double affine[6] = { width, 0, 0, height, x, y };
        _rsvg_affine_multiply (ctx->affine, affine, ctx->affine);
    }
    for (i = 0; i < 6; i++)
        ctx->paffine[i] = state->affine[i];
    if (ctx->filter->primitiveunits == objectBoundingBox) {
        double affine[6] = { width, 0, 0, height, x, y };
        _rsvg_affine_multiply (ctx->paffine, affine, ctx->paffine);
    }
}
rsvg_filter_fix_coordinate_system (RsvgFilterContext * ctx, RsvgState * state, RsvgBbox bbox)
{
    int x, y, height, width;
    int i;

    x = bbox.x;
    y = bbox.y;
    width = bbox.w;
    height = bbox.h;

    ctx->width = gdk_pixbuf_get_width (ctx->source);
    ctx->height = gdk_pixbuf_get_height (ctx->source);

    for (i = 0; i < 6; i++)
        ctx->affine[i] = state->affine[i];
    if (ctx->filter->filterunits == objectBoundingBox) {
        double affine[6] = { width, 0, 0, height, x, y };
        _rsvg_affine_multiply (ctx->affine, affine, ctx->affine);
    }
    for (i = 0; i < 6; i++)
        ctx->paffine[i] = state->affine[i];
    if (ctx->filter->primitiveunits == objectBoundingBox) {
        double affine[6] = { width, 0, 0, height, x, y };
        _rsvg_affine_multiply (ctx->paffine, affine, ctx->paffine);
    }
}