summaryrefslogtreecommitdiff
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
parent538d078cf007bd62f6a20ad3f8b0cacc11720e54 (diff)
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,
967 id = evas_filter_command_blend_add(ctx, drawctx, copybuf->id, blur_out->id, ox, oy, EVAS_FILTER_FILL_MODE_NONE); 967 id = evas_filter_command_blend_add(ctx, drawctx, copybuf->id, blur_out->id, ox, oy, EVAS_FILTER_FILL_MODE_NONE);
968 cmd->ENFN->context_color_set(cmd->ENDT, drawctx, R, G, B, A); 968 cmd->ENFN->context_color_set(cmd->ENDT, drawctx, R, G, B, A);
969 if (id < 0) goto fail; 969 if (id < 0) goto fail;
970 ox = oy = 0;
970 } 971 }
971 972
972 if (convert) 973 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,
1037 if (rx < 0) rx = 0; 1037 if (rx < 0) rx = 0;
1038 if (ry < 0) ry = 0; 1038 if (ry < 0) ry = 0;
1039 1039
1040 l = rx + in->pad.l - ox; 1040 l = rx + in->pad.l + ((ox < 0) ? (-ox) : 0);
1041 r = rx + in->pad.r + ox; 1041 r = rx + in->pad.r + ((ox > 0) ? ox : 0);
1042 t = ry + in->pad.t - oy; 1042 t = ry + in->pad.t + ((oy < 0) ? (-oy) : 0);
1043 b = ry + in->pad.b + oy; 1043 b = ry + in->pad.b + ((oy > 0) ? oy : 0);
1044 1044
1045 if (out->pad.l < l) out->pad.l = l; 1045 if (out->pad.l < l) out->pad.l = l;
1046 if (out->pad.r < r) out->pad.r = r; 1046 if (out->pad.r < r) out->pad.r = r;