From 5e0877ca2c0605df7a27dcdaaaba78885460dc0f Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Fri, 21 Sep 2018 12:30:50 +0000 Subject: [PATCH] efl_vg: calculate center point with double type Although the center point is double type, the calculation is integer type. To calculate center point correctly, calculate with double type. Differential Revision: https://phab.enlightenment.org/D7097 --- src/static_libs/vg_common/vg_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/static_libs/vg_common/vg_common.c b/src/static_libs/vg_common/vg_common.c index eb8a293829..1593a089ed 100644 --- a/src/static_libs/vg_common/vg_common.c +++ b/src/static_libs/vg_common/vg_common.c @@ -612,10 +612,10 @@ _apply_gradient_property(Svg_Style_Gradient *g, Efl_VG *vg, Efl_VG *parent, Vg_F efl_gfx_path_bounds_get(grad_obj, &grad_geom); - double cy = grad_geom.h / 2 + grad_geom.y; - double cy_scaled = (grad_geom.h / 2) * scale_reversed_Y; - double cx = grad_geom.w / 2 + grad_geom.x; - double cx_scaled = (grad_geom.w / 2) * scale_reversed_X; + double cy = (grad_geom.h / 2.0) + grad_geom.y; + double cy_scaled = (grad_geom.h / 2.0) * scale_reversed_Y; + double cx = (grad_geom.w / 2.0) + grad_geom.x; + double cx_scaled = (grad_geom.w / 2.0) * scale_reversed_X; /* matrix tranformation of gradient figure: * 0. we remember size of gradient and it's center point