aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-02-19 20:03:20 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-02-20 13:27:42 +0900
commit0d9ffc262455f7ea7a4727a54a3c20844df28d06 (patch)
treea420b0cb64545ab57de10eab587928dbe182198f /src
parentEvas filters: Fix curve filter with RGBA (diff)
downloadefl-0d9ffc262455f7ea7a4727a54a3c20844df28d06.tar.gz
Evas filters: Fix padding in blur with offset
Test case was: blur(ox=40, rx=40); This would crop the blurred text instead of having proper padding.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/filters/evas_filter.c1
-rw-r--r--src/lib/evas/filters/evas_filter_parser.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c
index 74b068c65b..b8c2afcbe4 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -967,6 +967,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void *drawctx,
id = evas_filter_command_blend_add(ctx, drawctx, copybuf->id, blur_out->id, ox, oy, EVAS_FILTER_FILL_MODE_NONE);
cmd->ENFN->context_color_set(cmd->ENDT, drawctx, R, G, B, A);
if (id < 0) goto fail;
+ ox = oy = 0;
}
if (convert)
diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c
index 087c0ac6bf..361dba0b06 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1037,10 +1037,10 @@ _blur_padding_update(Evas_Filter_Program *pgm, Evas_Filter_Instruction *instr,
if (rx < 0) rx = 0;
if (ry < 0) ry = 0;
- l = rx + in->pad.l - ox;
- r = rx + in->pad.r + ox;
- t = ry + in->pad.t - oy;
- b = ry + in->pad.b + oy;
+ l = rx + in->pad.l + ((ox < 0) ? (-ox) : 0);
+ r = rx + in->pad.r + ((ox > 0) ? ox : 0);
+ t = ry + in->pad.t + ((oy < 0) ? (-oy) : 0);
+ b = ry + in->pad.b + ((oy > 0) ? oy : 0);
if (out->pad.l < l) out->pad.l = l;
if (out->pad.r < r) out->pad.r = r;