From 7e6bd5ed92a724932230dbebf28cd4f776441178 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 18 Apr 2019 19:30:33 +0900 Subject: [PATCH] evas map: move to floating point coordinate system in high-quality drawing. evas map has used integer coodinate system since it's born, since object's transition is jiggled, not perfectly smooth. It's obvious because Positioning must be stepping with integer units without any subpixel rendering. Currently, this patch is a sort of preparatory to improve this, only valid for high-quality evas map (smooth + anti-aliasing) --- src/lib/evas/common/evas_map_image_internal_high.c | 4 ++-- src/modules/evas/engines/software_generic/evas_engine.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/common/evas_map_image_internal_high.c b/src/lib/evas/common/evas_map_image_internal_high.c index b3945f9..0fd3ce4 100644 --- a/src/lib/evas/common/evas_map_image_internal_high.c +++ b/src/lib/evas/common/evas_map_image_internal_high.c @@ -774,8 +774,8 @@ _evas_common_map_rgba_internal_high(RGBA_Image *src, RGBA_Image *dst, Check alpha transparency. */ for (int i = 0; i < 4; i++) { - x[i] = ((float) (p[i].x >> FP)) + 0.5; - y[i] = ((float) (p[i].y >> FP)) + 0.5; + x[i] = p[i].fx + 0.5; + y[i] = p[i].fy + 0.5; u[i] = (p[i].u >> FP); v[i] = (p[i].v >> FP); c[i] = p[i].col; diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c index f8d0163..0e52f3e 100755 --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@ -2494,7 +2494,8 @@ _draw_thread_map_draw(void *data) continue; } - if ((m->pts[0 + offset].x == m->pts[3 + offset].x) && + if (!(map->anti_alias && map->smooth) && //For sub-pixel rendering + (m->pts[0 + offset].x == m->pts[3 + offset].x) && (m->pts[1 + offset].x == m->pts[2 + offset].x) && (m->pts[0 + offset].y == m->pts[1 + offset].y) && (m->pts[3 + offset].y == m->pts[2 + offset].y) && -- 2.7.4