static void st_collections_group_parts_part_description_image_tween(void);
static void st_collections_group_parts_part_description_image_border(void);
static void st_collections_group_parts_part_description_image_middle(void);
+static void st_collections_group_parts_part_description_image_scale_hint(void);
static void st_collections_group_parts_part_description_fill_smooth(void);
static void st_collections_group_parts_part_description_fill_origin_relative(void);
static void st_collections_group_parts_part_description_fill_origin_offset(void);
{"collections.group.parts.part.description.image.images.image", st_images_image}, /* dup */
{"collections.group.parts.part.description.image.border", st_collections_group_parts_part_description_image_border},
{"collections.group.parts.part.description.image.middle", st_collections_group_parts_part_description_image_middle},
+ {"collections.group.parts.part.description.image.scale_hint", st_collections_group_parts_part_description_image_scale_hint},
{"collections.group.parts.part.description.fill.smooth", st_collections_group_parts_part_description_fill_smooth},
{"collections.group.parts.part.description.fill.origin.relative", st_collections_group_parts_part_description_fill_origin_relative},
{"collections.group.parts.part.description.fill.origin.offset", st_collections_group_parts_part_description_fill_origin_offset},
/**
@page edcref
+ @property
+ scale_hint
+ @parameters
+ 0, NANE, DYNAMIC, STATIC
+ @effect
+ Sets the evas image scale hint letting the engine more efectively save
+ cached copies of the scaled image if it maks sense
+ @endproperty
+*/
+static void
+st_collections_group_parts_part_description_image_scale_hint(void)
+{
+ Edje_Part_Collection *pc;
+ Edje_Part *ep;
+ Edje_Part_Description *ed;
+
+ check_arg_count(1);
+
+ pc = eina_list_data_get(eina_list_last(edje_collections));
+ ep = eina_list_data_get(eina_list_last(pc->parts));
+
+ if (ep->type != EDJE_PART_TYPE_IMAGE)
+ {
+ fprintf(stderr, "%s: Error. parse error %s:%i. "
+ "image attributes in non-IMAGE part.\n",
+ progname, file_in, line - 1);
+ exit(-1);
+ }
+
+ ed = ep->default_desc;
+ if (ep->other_desc) ed = eina_list_data_get(eina_list_last(ep->other_desc));
+ ed->image.scale_hint = parse_enum(0,
+ "NONE", EVAS_IMAGE_SCALE_HINT_NONE,
+ "DYNAMIC", EVAS_IMAGE_SCALE_HINT_DYNAMIC,
+ "STATIC", EVAS_IMAGE_SCALE_HINT_STATIC,
+ "0", EVAS_IMAGE_SCALE_HINT_NONE,
+ NULL);
+}
+
+/**
+ @page edcref
@block
fill
@context
evas_object_image_fill_set(ep->object, p3->fill.x, p3->fill.y,
p3->fill.w, p3->fill.h);
evas_object_image_smooth_scale_set(ep->object, p3->smooth);
-
evas_object_image_border_set(ep->object, p3->border.l, p3->border.r,
p3->border.t, p3->border.b);
if (chosen_desc->border.no_fill == 0)
{
case EDJE_PART_TYPE_RECTANGLE:
case EDJE_PART_TYPE_IMAGE:
+ evas_object_image_scale_hint_set(ep->object,
+ chosen_desc->image.scale_hint);
case EDJE_PART_TYPE_TEXTBLOCK:
case EDJE_PART_TYPE_GRADIENT:
case EDJE_PART_TYPE_BOX:
struct {
Eina_List *tween_list; /* list of Edje_Part_Image_Id */
int id; /* the image id to use */
+ int scale_hint; /* evas scale hint */
} image;
struct {
unsigned char min_y; /* if text size should be part min size */
unsigned char max_x; /* if text size should be part max size */
unsigned char max_y; /* if text size should be part max size */
-
} text;
struct {
char *layout, *alt_layout;
Edje_Alignment align;
struct {
- int x, y;
+ int x, y;
} padding;
struct {
- Eina_Bool h, v;
+ Eina_Bool h, v;
} min;
} box;
+
struct {
unsigned char homogeneous;
Edje_Alignment align;
struct {
- int x, y;
+ int x, y;
} padding;
} table;