summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-01-06 09:57:46 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-01-06 15:58:46 -0800
commit8f1c071d6adbf6f8e2002eeeabdc7f3d7be9ef22 (patch)
tree17bddaa85bcdead8807053b009d1adf1c9eda71c /src/static_libs
parentf9928b75c8c4a2e6c3f02aafb68c8a569a47ab04 (diff)
eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ.
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/triangulator/triangulator_stroker.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/static_libs/triangulator/triangulator_stroker.c b/src/static_libs/triangulator/triangulator_stroker.c
index 436229b..a1d0665 100644
--- a/src/static_libs/triangulator/triangulator_stroker.c
+++ b/src/static_libs/triangulator/triangulator_stroker.c
@@ -30,9 +30,9 @@ normal_vector(float x1, float y1, float x2, float y2, float width,
30 float dx = x2 - x1; 30 float dx = x2 - x1;
31 float dy = y2 - y1; 31 float dy = y2 - y1;
32 32
33 if (EINA_FLT_CMP(dx, 0)) 33 if (EINA_FLT_EQ(dx, 0))
34 pw = width / fabsf(dy); 34 pw = width / fabsf(dy);
35 else if (EINA_FLT_CMP(dy, 0)) 35 else if (EINA_FLT_EQ(dy, 0))
36 pw = width / fabsf(dx); 36 pw = width / fabsf(dx);
37 else 37 else
38 pw = width / sqrtf(dx*dx + dy*dy); 38 pw = width / sqrtf(dx*dx + dy*dy);
@@ -396,7 +396,7 @@ static inline void
396_skip_duplicate_points(const double **pts, const double *end_pts) 396_skip_duplicate_points(const double **pts, const double *end_pts)
397{ 397{
398 while ((*pts + 2) < end_pts && (*pts)[0] == (*pts)[2] && 398 while ((*pts + 2) < end_pts && (*pts)[0] == (*pts)[2] &&
399 EINA_FLT_CMP((*pts)[1], (*pts)[3])) 399 EINA_FLT_EQ((*pts)[1], (*pts)[3]))
400 { 400 {
401 *pts += 2; 401 *pts += 2;
402 } 402 }
@@ -424,7 +424,7 @@ _path_info_get(const Efl_Gfx_Path_Command *cmds, const double *pts, Eina_Bool *i
424 *implicit_close = EINA_TRUE; 424 *implicit_close = EINA_TRUE;
425 // fall through 425 // fall through
426 case EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO: 426 case EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO:
427 if (EINA_FLT_CMP(pts[0], pts[i]) && EINA_FLT_CMP(pts[1], pts[i+1])) 427 if (EINA_FLT_EQ(pts[0], pts[i]) && EINA_FLT_EQ(pts[1], pts[i+1]))
428 *ends_at_start = EINA_TRUE; 428 *ends_at_start = EINA_TRUE;
429 return; 429 return;
430 default: 430 default:
@@ -432,8 +432,8 @@ _path_info_get(const Efl_Gfx_Path_Command *cmds, const double *pts, Eina_Bool *i
432 } 432 }
433 } 433 }
434 // this path is the last path with out implicit close. 434 // this path is the last path with out implicit close.
435 *ends_at_start = EINA_FLT_CMP(pts[0], pts[i]) && 435 *ends_at_start = EINA_FLT_EQ(pts[0], pts[i]) &&
436 EINA_FLT_CMP(pts[1], pts[i+1]); 436 EINA_FLT_EQ(pts[1], pts[i+1]);
437} 437}
438 438
439void 439void
@@ -492,7 +492,7 @@ triangulator_stroker_process(Triangulator_Stroker *stroker,
492 break; 492 break;
493 } 493 }
494 case EFL_GFX_PATH_COMMAND_TYPE_LINE_TO: 494 case EFL_GFX_PATH_COMMAND_TYPE_LINE_TO:
495 if (!EINA_FLT_CMP(stroker->cx, pts[0]) || !EINA_FLT_CMP(stroker->cy, (float)pts[1])) 495 if (!EINA_FLT_EQ(stroker->cx, pts[0]) || !EINA_FLT_EQ(stroker->cy, (float)pts[1]))
496 { 496 {
497 if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO) 497 if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO)
498 add_join(stroker, pts[0], pts[1]); 498 add_join(stroker, pts[0], pts[1]);
@@ -502,15 +502,15 @@ triangulator_stroker_process(Triangulator_Stroker *stroker,
502 pts+=2; 502 pts+=2;
503 break; 503 break;
504 case EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO: 504 case EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO:
505 if (!EINA_FLT_CMP(stroker->cx, pts[0]) || 505 if (!EINA_FLT_EQ(stroker->cx, pts[0]) ||
506 !EINA_FLT_CMP(stroker->cy, pts[1]) || 506 !EINA_FLT_EQ(stroker->cy, pts[1]) ||
507 !EINA_FLT_CMP(pts[0], pts[2]) || 507 !EINA_FLT_EQ(pts[0], pts[2]) ||
508 !EINA_FLT_CMP(pts[1], pts[3]) || 508 !EINA_FLT_EQ(pts[1], pts[3]) ||
509 !EINA_FLT_CMP(pts[2], pts[4]) || 509 !EINA_FLT_EQ(pts[2], pts[4]) ||
510 !EINA_FLT_CMP(pts[3], pts[5])) 510 !EINA_FLT_EQ(pts[3], pts[5]))
511 { 511 {
512 if (!EINA_FLT_CMP(stroker->cx, pts[0]) || 512 if (!EINA_FLT_EQ(stroker->cx, pts[0]) ||
513 !EINA_FLT_CMP(stroker->cy, pts[1])) 513 !EINA_FLT_EQ(stroker->cy, pts[1]))
514 { 514 {
515 if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO) 515 if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO)
516 add_join(stroker, pts[0], pts[1]); 516 add_join(stroker, pts[0], pts[1]);