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
This commit is contained in:
Jaehyun Cho 2018-09-21 12:30:50 +00:00 committed by Marcel Hollerbach
parent c0b672db9c
commit 5e0877ca2c
1 changed files with 4 additions and 4 deletions

View File

@ -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