evas_object_image_file_set(o, build_path("logo.png"), NULL);
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
- a = 256 - (1 << (rnd() & 0x7));
- if (a > 255) a = 255;
+ a = 256 - (1 << ((rnd() % 8) + 1));
+ if (a < 128) a = 128;
evas_object_color_set(o, a, a, a, a);
evas_object_show(o);
}
evas_object_image_file_set(o, build_path("image.png"), NULL);
evas_object_image_fill_set(o, 0, 0, 120, 160);
evas_object_resize(o, 120, 160);
- a = 256 - (1 << (rnd() & 0x7));
- if (a > 255) a = 255;
+ a = 256 - (1 << ((rnd() % 8) + 1));
+ if (a < 128) a = 128;
evas_object_color_set(o, a, a, a, a);
evas_object_show(o);
}
o = evas_object_rectangle_add(evas);
o_images[i] = o;
- a = 256 - (1 << (rnd() & 0x7));
- if (a > 255) a = 255;
+ a = 256 - (1 << ((rnd() % 8) + 1));
+ if (a < 128) a = 128;
r = ((rnd()&0xff) * a) / 255;
g = ((rnd()&0xff) * a) / 255;
b = ((rnd()&0xff) * a) / 255;
o = evas_object_rectangle_add(evas);
o_images[i] = o;
- a = 256 - (1 << (rnd() & 0x7));
- if (a > 255) a = 255;
+ a = 256 - (1 << ((rnd() % 8) + 1));
+ if (a < 128) a = 128;
r = ((rnd()&0xff) * a) / 255;
g = ((rnd()&0xff) * a) / 255;
b = ((rnd()&0xff) * a) / 255;