summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2018-07-03 06:18:37 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-07-05 23:01:00 +0200
commitbd3298dead3312bdfaff98b4c5466bd6bd23063b (patch)
treeeb245f992a6eebcbd7cd73672c70c8685dffb804
parent50727d3439ccb2a77d9762c31240b160142f1d35 (diff)
elementary textpath: code refactoring.
Don't twist code unnecessarily. logically same, round() is enough. Differential Revision: https://phab.enlightenment.org/D6501
-rw-r--r--src/lib/elementary/efl_ui_textpath.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/elementary/efl_ui_textpath.c b/src/lib/elementary/efl_ui_textpath.c
index a0bb48bc95..20b04092b0 100644
--- a/src/lib/elementary/efl_ui_textpath.c
+++ b/src/lib/elementary/efl_ui_textpath.c
@@ -125,10 +125,10 @@ _segment_draw(Efl_Ui_Textpath_Data *pd, int slice_no, double dt, double dist,
125 125
126 if (cmp == 0) 126 if (cmp == 0)
127 { 127 {
128 *last_x1 = (int) floor(vec1.x + r.x + 0.5); 128 *last_x1 = (int) round(vec1.x + r.x);
129 *last_y1 = (int) floor(vec1.y + r.y + 0.5); 129 *last_y1 = (int) round(vec1.y + r.y);
130 *last_x2 = (int) floor(vec2.x + r.x + 0.5); 130 *last_x2 = (int) round(vec2.x + r.x);
131 *last_y2 = (int) floor(vec2.y + r.y + 0.5); 131 *last_y2 = (int) round(vec2.y + r.y);
132 } 132 }
133 133
134 //add points to map 134 //add points to map
@@ -181,10 +181,10 @@ _segment_draw(Efl_Ui_Textpath_Data *pd, int slice_no, double dt, double dist,
181 * It improves smoothness of curve's slope changing. */ 181 * It improves smoothness of curve's slope changing. */
182 mp0_x = *last_x1; 182 mp0_x = *last_x1;
183 mp0_y = *last_y1; 183 mp0_y = *last_y1;
184 mp1_x = *last_x1 + (int) floor(vec1.x - vec0.x + 0.5); 184 mp1_x = *last_x1 + (int) round(vec1.x - vec0.x);
185 mp1_y = *last_y1 + (int) floor(vec1.y - vec0.y + 0.5); 185 mp1_y = *last_y1 + (int) round(vec1.y - vec0.y);
186 mp2_x = *last_x2 + (int) floor(vec2.x - vec3.x + 0.5); 186 mp2_x = *last_x2 + (int) round(vec2.x - vec3.x);
187 mp2_y = *last_y2 + (int) floor(vec2.y - vec3.y + 0.5); 187 mp2_y = *last_y2 + (int) round(vec2.y - vec3.y);
188 mp3_x = *last_x2; 188 mp3_x = *last_x2;
189 mp3_y = *last_y2; 189 mp3_y = *last_y2;
190 190