forked from enlightenment/efl
* evas: notice object change on map color change.
SVN revision: 55335
This commit is contained in:
parent
014d9e424c
commit
36e4de5f51
|
@ -37,9 +37,36 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
Evas_Coord x1, x2, y1, y2;
|
Evas_Coord x1, x2, y1, y2;
|
||||||
const Evas_Map_Point *p, *p_end;
|
const Evas_Map_Point *p, *p_end;
|
||||||
int ch;
|
Eina_Bool ch = EINA_FALSE;
|
||||||
|
|
||||||
if (!obj->cur.map) return;
|
if (!obj->cur.map) return;
|
||||||
|
if (obj->prev.map)
|
||||||
|
{
|
||||||
|
if (obj->prev.map->count == obj->cur.map->count)
|
||||||
|
{
|
||||||
|
const Evas_Map_Point *p2;
|
||||||
|
|
||||||
|
p = obj->cur.map->points;
|
||||||
|
p_end = p + obj->cur.map->count;
|
||||||
|
p2 = obj->cur.map->points;
|
||||||
|
|
||||||
|
for (; p < p_end; p++, p2++)
|
||||||
|
if (p->a != p2->a ||
|
||||||
|
p->r != p2->r ||
|
||||||
|
p->g != p2->g ||
|
||||||
|
p->b != p2->b)
|
||||||
|
{
|
||||||
|
ch = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ch = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
p = obj->cur.map->points;
|
p = obj->cur.map->points;
|
||||||
p_end = p + obj->cur.map->count;
|
p_end = p + obj->cur.map->count;
|
||||||
x1 = p->x;
|
x1 = p->x;
|
||||||
|
@ -54,7 +81,6 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
|
||||||
if (p->y < y1) y1 = p->y;
|
if (p->y < y1) y1 = p->y;
|
||||||
if (p->y > y2) y2 = p->y;
|
if (p->y > y2) y2 = p->y;
|
||||||
}
|
}
|
||||||
ch = 0;
|
|
||||||
if (obj->cur.map->normal_geometry.x != x1) ch = 1;
|
if (obj->cur.map->normal_geometry.x != x1) ch = 1;
|
||||||
if (obj->cur.map->normal_geometry.y != y1) ch = 1;
|
if (obj->cur.map->normal_geometry.y != y1) ch = 1;
|
||||||
if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1;
|
if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1;
|
||||||
|
|
Loading…
Reference in New Issue