fix double to Evas_Coord conversion warnings

SVN revision: 42662
This commit is contained in:
Vincent Torri 2009-09-24 04:55:01 +00:00
parent 32d0ba3d65
commit 6677c2fcf9
6 changed files with 45 additions and 45 deletions

View File

@ -411,11 +411,11 @@ evas_object_gradient_fill_angle_get(const Evas_Object *obj)
Evas_Object_Gradient *o;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return 0.0;
return 0;
MAGIC_CHECK_END();
o = (Evas_Object_Gradient *)(obj->object_data);
MAGIC_CHECK(o, Evas_Object_Gradient, MAGIC_OBJ_GRADIENT);
return 0.0;
return 0;
MAGIC_CHECK_END();
return o->cur.fill.angle;
}
@ -503,11 +503,11 @@ evas_object_gradient_angle_get(const Evas_Object *obj)
Evas_Object_Gradient *o;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return 0.0;
return 0;
MAGIC_CHECK_END();
o = (Evas_Object_Gradient *)(obj->object_data);
MAGIC_CHECK(o, Evas_Object_Gradient, MAGIC_OBJ_GRADIENT);
return 0.0;
return 0;
MAGIC_CHECK_END();
return o->cur.map.angle;
}
@ -859,14 +859,14 @@ evas_object_gradient_new(void)
o = calloc(1, sizeof(Evas_Object_Gradient));
if (!o) return NULL;
o->magic = MAGIC_OBJ_GRADIENT;
o->cur.map.angle = 0.0;
o->cur.map.angle = 0;
o->cur.map.offset = 0.0;
o->cur.map.direction = 1;
o->cur.fill.x = 0;
o->cur.fill.y = 0;
o->cur.fill.w = 1;
o->cur.fill.h = 1;
o->cur.fill.angle = 0.0;
o->cur.fill.angle = 0;
o->cur.fill.spread = EVAS_TEXTURE_REFLECT;
o->cur.type.name = strdup("linear");
o->cur.type.params = NULL;

View File

@ -603,8 +603,8 @@ evas_object_image_fill_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Co
if (w < 0) w = -w;
if (h < 0) h = -h;
if (w == 0.0) return;
if (h == 0.0) return;
if (w == 0) return;
if (h == 0) return;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return;
MAGIC_CHECK_END();
@ -2325,10 +2325,10 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
o->cur.border.t, o->cur.border.b);
idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw);
idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh);
if (idw < 1.0) idw = 1.0;
if (idh < 1.0) idh = 1.0;
if (idx > 0.0) idx -= idw;
if (idy > 0.0) idy -= idh;
if (idw < 1) idw = 1;
if (idh < 1) idh = 1;
if (idx > 0) idx -= idw;
if (idy > 0) idy -= idh;
while ((int)idx < obj->cur.geometry.w)
{
Evas_Coord ydy;
@ -2337,7 +2337,7 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
ydy = idy;
ix = idx;
if ((o->cur.fill.w == obj->cur.geometry.w) &&
(o->cur.fill.x == 0.0))
(o->cur.fill.x == 0))
{
dobreak_w = 1;
iw = obj->cur.geometry.w;
@ -2350,7 +2350,7 @@ evas_object_image_render(Evas_Object *obj, void *output, void *context, void *su
iy = idy;
if ((o->cur.fill.h == obj->cur.geometry.h) &&
(o->cur.fill.y == 0.0))
(o->cur.fill.y == 0))
{
ih = obj->cur.geometry.h;
dobreak_h = 1;

View File

@ -155,8 +155,8 @@ evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coo
}
obj->cur.geometry.x = min_x;
obj->cur.geometry.y = min_y;
obj->cur.geometry.w = max_x - min_x + 2.0;
obj->cur.geometry.h = max_y - min_y + 2.0;
obj->cur.geometry.w = max_x - min_x + 2;
obj->cur.geometry.h = max_y - min_y + 2;
//// obj->cur.cache.geometry.validity = 0;
o->cur.x1 = x1 - min_x;
o->cur.y1 = y1 - min_y;
@ -203,18 +203,18 @@ evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1,
Evas_Object_Line *o;
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
if (x1) *x1 = 0.0;
if (y1) *y1 = 0.0;
if (x2) *x2 = 0.0;
if (y2) *y2 = 0.0;
if (x1) *x1 = 0;
if (y1) *y1 = 0;
if (x2) *x2 = 0;
if (y2) *y2 = 0;
return;
MAGIC_CHECK_END();
o = (Evas_Object_Line *)(obj->object_data);
MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE);
if (x1) *x1 = 0.0;
if (y1) *y1 = 0.0;
if (x2) *x2 = 0.0;
if (y2) *y2 = 0.0;
if (x1) *x1 = 0;
if (y1) *y1 = 0;
if (x2) *x2 = 0;
if (y2) *y2 = 0;
return;
MAGIC_CHECK_END();
if (x1) *x1 = obj->cur.geometry.x + o->cur.x1;
@ -260,10 +260,10 @@ evas_object_line_new(void)
/* alloc obj private data */
o = calloc(1, sizeof(Evas_Object_Line));
o->magic = MAGIC_OBJ_LINE;
o->cur.x1 = 0.0;
o->cur.y1 = 0.0;
o->cur.x2 = 31.0;
o->cur.y2 = 31.0;
o->cur.x1 = 0;
o->cur.y1 = 0;
o->cur.x2 = 31;
o->cur.y2 = 31;
o->prev = o->cur;
return o;
}

View File

@ -479,7 +479,7 @@ evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
return;
MAGIC_CHECK_END();
if (obj->delete_me) return;
if (w < 0.0) w = 0.0; if (h < 0.0) h = 0.0;
if (w < 0) w = 0; if (h < 0) h = 0;
if (evas_object_intercept_call_resize(obj, w, h)) return;
#ifdef FORWARD_NOOP_RESIZES_TO_SMART_OBJS
if (obj->smart.smart)

View File

@ -137,23 +137,23 @@ evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
{
obj->cur.geometry.x = p->x;
obj->cur.geometry.y = p->y;
obj->cur.geometry.w = 2.0;
obj->cur.geometry.h = 2.0;
obj->cur.geometry.w = 2;
obj->cur.geometry.h = 2;
}
else
{
if (x < obj->cur.geometry.x) min_x = x;
else min_x = obj->cur.geometry.x;
if (x > (obj->cur.geometry.x + obj->cur.geometry.w - 2.0)) max_x = x;
else max_x = obj->cur.geometry.x + obj->cur.geometry.w - 2.0;
if (x > (obj->cur.geometry.x + obj->cur.geometry.w - 2)) max_x = x;
else max_x = obj->cur.geometry.x + obj->cur.geometry.w - 2;
if (y < obj->cur.geometry.y) min_y = y;
else min_y = obj->cur.geometry.y;
if (y > (obj->cur.geometry.y + obj->cur.geometry.h - 2.0)) max_y = y;
else max_y = obj->cur.geometry.y + obj->cur.geometry.h - 2.0;
if (y > (obj->cur.geometry.y + obj->cur.geometry.h - 2)) max_y = y;
else max_y = obj->cur.geometry.y + obj->cur.geometry.h - 2;
obj->cur.geometry.x = min_x;
obj->cur.geometry.y = min_y;
obj->cur.geometry.w = max_x - min_x + 2.0;
obj->cur.geometry.h = max_y - min_y + 2.0;
obj->cur.geometry.w = max_x - min_x + 2;
obj->cur.geometry.h = max_y - min_y + 2;
}
o->points = eina_list_append(o->points, p);
@ -241,10 +241,10 @@ evas_object_polygon_init(Evas_Object *obj)
obj->cur.color.g = 255;
obj->cur.color.b = 255;
obj->cur.color.a = 255;
obj->cur.geometry.x = 0.0;
obj->cur.geometry.y = 0.0;
obj->cur.geometry.w = 0.0;
obj->cur.geometry.h = 0.0;
obj->cur.geometry.x = 0;
obj->cur.geometry.y = 0;
obj->cur.geometry.w = 0;
obj->cur.geometry.h = 0;
obj->cur.layer = 0;
/* set up object-specific settings */
obj->prev = obj->cur;

View File

@ -1335,10 +1335,10 @@ evas_object_text_init(Evas_Object *obj)
obj->cur.color.g = 255;
obj->cur.color.b = 255;
obj->cur.color.a = 255;
obj->cur.geometry.x = 0.0;
obj->cur.geometry.y = 0.0;
obj->cur.geometry.w = 0.0;
obj->cur.geometry.h = 0.0;
obj->cur.geometry.x = 0;
obj->cur.geometry.y = 0;
obj->cur.geometry.w = 0;
obj->cur.geometry.h = 0;
obj->cur.layer = 0;
/* set up object-specific settings */
obj->prev = obj->cur;