summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_node.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c
index dd32a50..f983f8d 100644
--- a/src/lib/evas/canvas/evas_vg_node.c
+++ b/src/lib/evas/canvas/evas_vg_node.c
@@ -86,23 +86,19 @@ _efl_vg_origin_get(Eo *obj EINA_UNUSED,
86} 86}
87 87
88static void 88static void
89_efl_vg_efl_gfx_position_set(Eo *obj EINA_UNUSED, 89_efl_vg_efl_gfx_position_set(Eo *obj EINA_UNUSED, Efl_VG_Data *pd, Eina_Position2D pos)
90 Efl_VG_Data *pd,
91 int x, int y)
92{ 90{
93 pd->x = lrint(x); 91 pd->x = (double) pos.x;
94 pd->y = lrint(y); 92 pd->y = (double) pos.y;
95 93
96 _efl_vg_changed(obj); 94 _efl_vg_changed(obj);
97} 95}
98 96
99static void 97static Eina_Position2D
100_efl_vg_efl_gfx_position_get(Eo *obj EINA_UNUSED, 98_efl_vg_efl_gfx_position_get(Eo *obj EINA_UNUSED, Efl_VG_Data *pd)
101 Efl_VG_Data *pd,
102 int *x, int *y)
103{ 99{
104 if (x) *x = pd->x; 100 // NOTE: This casts double to int!
105 if (y) *y = pd->y; 101 return EINA_POSITION2D(pd->x, pd->y);
106} 102}
107 103
108static void 104static void
@@ -205,7 +201,7 @@ EOLIAN static Eina_Rect
205_efl_vg_efl_gfx_geometry_get(Eo *obj, Efl_VG_Data *pd EINA_UNUSED) 201_efl_vg_efl_gfx_geometry_get(Eo *obj, Efl_VG_Data *pd EINA_UNUSED)
206{ 202{
207 Eina_Rect r = EINA_RECT_ZERO(); 203 Eina_Rect r = EINA_RECT_ZERO();
208 efl_gfx_position_get(obj, &r.x, &r.y); 204 r.pos = efl_gfx_position_get(obj);
209 efl_gfx_size_get(obj, &r.w, &r.h); 205 efl_gfx_size_get(obj, &r.w, &r.h);
210 return r; 206 return r;
211} 207}
@@ -810,14 +806,17 @@ evas_vg_node_color_set(Eo *obj, int r, int g, int b, int a)
810EAPI void 806EAPI void
811evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h) 807evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h)
812{ 808{
813 efl_gfx_position_get(obj, x, y); 809 Eina_Rect r;
810 r.pos = efl_gfx_position_get(obj);
814 efl_gfx_size_get(obj, w, h); 811 efl_gfx_size_get(obj, w, h);
812 if (x) *x = r.x;
813 if (y) *y = r.y;
815} 814}
816 815
817EAPI void 816EAPI void
818evas_vg_node_geometry_set(Eo *obj, int x, int y, int w, int h) 817evas_vg_node_geometry_set(Eo *obj, int x, int y, int w, int h)
819{ 818{
820 efl_gfx_position_set(obj, x, y); 819 efl_gfx_position_set(obj, EINA_POSITION2D(x, y));
821 efl_gfx_size_set(obj, w, h); 820 efl_gfx_size_set(obj, w, h);
822} 821}
823 822