summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-02-12 12:10:04 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-02-12 22:30:10 +0900
commitd3527da0ab8cd9d9727c9aeca08df115be3632e2 (patch)
treea6be9cf62c21dacfea05bc269c71925692998bdb
parent430169053570ba4c3dc21ec2ae07f5b295939f6a (diff)
downloadefl-d3527da0ab8cd9d9727c9aeca08df115be3632e2.tar.gz
evas - image obj - filled mode - never use invalid 0x0 fill
this fixes a lot of noise for filled image objects that set fill to 0x0 if objetc is 0x0. this clamps minimum fill at 1x1 and thus keeps things silent and sensible. also just silently ignore 0x0 filled image objects. noise is not that useful.
-rw-r--r--src/lib/evas/canvas/evas_object_image.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index cbeb11620d..4c9a87b528 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -3561,12 +3561,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
/* if so what and where and add the appropriate redraw rectangles */
Evas_Public_Data *e = obj->layer->evas;
- if ((o->cur->fill.w < 1) || (o->cur->fill.h < 1))
- {
- ERR("%p has invalid fill size: %dx%d. Ignored",
- eo_obj, o->cur->fill.w, o->cur->fill.h);
- return;
- }
+ if ((o->cur->fill.w < 1) || (o->cur->fill.h < 1)) return;
/* if someone is clipping this obj - go calculate the clipper */
if (obj->cur->clipper)
@@ -4572,6 +4567,8 @@ evas_object_image_filled_resize_listener(void *data EINA_UNUSED, Evas *e EINA_UN
Evas_Coord w, h;
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+ if (w < 1) w = 1;
+ if (h < 1) h = 1;
evas_object_image_fill_set(obj, 0, 0, w, h);
}