summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2020-06-25 13:13:31 +0900
committerHermet Park <chuneon.park@samsung.com>2020-06-25 13:13:31 +0900
commitfd4f4c43647c4971a94f1eff2266be7df47a9f66 (patch)
tree6f21e1e8bee46ab3449ce51877048966881a4317
parent3cf052af338934039211e315641a35a9a2cbed1a (diff)
Revert "Efl.Gfx.Path: Change draw of a rounded rect from arc to quadratic"
Summary: This reverts commit 4f15bde706ec8cd78fa57845c8eee7bdb5515282. It is the correct way to draw with arc_to. And breaking compatibility for current_get. Test Plan: N/A Reviewers: Hermet, kimcinoo, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12030
-rw-r--r--src/lib/efl/interfaces/efl_gfx_path.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/efl/interfaces/efl_gfx_path.c b/src/lib/efl/interfaces/efl_gfx_path.c
index 8a02f1f79b..5f2898f06e 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.c
+++ b/src/lib/efl/interfaces/efl_gfx_path.c
@@ -1108,18 +1108,16 @@ _efl_gfx_path_append_rect(Eo *obj, Efl_Gfx_Path_Data *pd,
1108 } 1108 }
1109 1109
1110 // clamp the rx and ry radius value. 1110 // clamp the rx and ry radius value.
1111 rx = 2*rx;
1112 ry = 2*ry;
1111 if (rx > w) rx = w; 1113 if (rx > w) rx = w;
1112 if (ry > h) ry = h; 1114 if (ry > h) ry = h;
1113 1115
1114 _efl_gfx_path_append_move_to(obj, pd, x + rx, y); 1116 _efl_gfx_path_append_move_to(obj, pd, x, y + h/2);
1115 _efl_gfx_path_append_line_to(obj, pd, x + (w - rx), y); 1117 _efl_gfx_path_append_arc(obj, pd, x, y + h - ry, rx, ry, 180, 90);
1116 _efl_gfx_path_append_quadratic_to(obj, pd, x + w, y + ry, x + w, y); 1118 _efl_gfx_path_append_arc(obj, pd, x + w - rx, y + h - ry, rx, ry, 270, 90);
1117 _efl_gfx_path_append_line_to(obj, pd, x + w, y + (h - ry)); 1119 _efl_gfx_path_append_arc(obj, pd, x + w - rx, y, rx, ry, 0, 90);
1118 _efl_gfx_path_append_quadratic_to(obj, pd, x + (w - rx), y + h, x + w, y + h); 1120 _efl_gfx_path_append_arc(obj, pd, x, y, rx, ry, 90, 90);
1119 _efl_gfx_path_append_line_to(obj, pd, x + rx, y + h);
1120 _efl_gfx_path_append_quadratic_to(obj, pd, x , y + (h - ry), x, y + h);
1121 _efl_gfx_path_append_line_to(obj, pd, x, y + ry);
1122 _efl_gfx_path_append_quadratic_to(obj, pd, x + rx, y, x, y);
1123 _efl_gfx_path_append_close(obj, pd); 1121 _efl_gfx_path_append_close(obj, pd);
1124 1122
1125 //update convex flag 1123 //update convex flag