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_border_scale(void);
+static void st_collections_group_parts_part_description_image_border_scale_by(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);
{"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.border_scale", st_collections_group_parts_part_description_image_border_scale},
+ {"collections.group.parts.part.description.image.border_scale_by", st_collections_group_parts_part_description_image_border_scale_by},
{"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},
/**
@page edcref
@property
+ border_scale_by
+ @parameters
+ 0.0 or bigger (0.0 or 1.0 to turn it off)
+ @effect
+ If border scaling is enabled then normally the OUTPUT border sizes
+ (e.g. if 3 pixels on the left edge are set as a border, then normally
+ at scale 1.0, those 3 columns will always be the exact 3 columns of
+ output, or at scale 2.0 they will be 6 columns, or 0.33 they will merge
+ into a single column). This property multiplies the input scale
+ factor by this multiplier, allowing the creation of "supersampled"
+ borders to make much higher resolution outputs possible by always using
+ the highest resolution artwork and then runtime scaling it down.
+ @endproperty
+*/
+static void
+st_collections_group_parts_part_description_image_border_scale_by(void)
+{
+ Edje_Part_Description_Image *ed;
+
+ check_arg_count(1);
+
+ if (current_part->type != EDJE_PART_TYPE_IMAGE)
+ {
+ ERR("%s: Error. parse error %s:%i. "
+ "image attributes in non-IMAGE part.",
+ progname, file_in, line - 1);
+ exit(-1);
+ }
+
+ ed = (Edje_Part_Description_Image*) current_desc;
+
+ ed->image.border.scale_by = FROM_DOUBLE(parse_float_range(0, 0.0, 999999999.0));
+}
+
+/**
+ @page edcref
+ @property
border_scale
@parameters
0, 1
p3->type.common.fill.w, p3->type.common.fill.h);
evas_object_image_smooth_scale_set(ep->object, p3->smooth);
if (chosen_desc->image.border.scale)
- evas_object_image_border_scale_set(ep->object, TO_DOUBLE(sc));
+ {
+ if (chosen_desc->image.border.scale_by > FROM_DOUBLE(0.0))
+ {
+ FLOAT_T sc2 = MUL(sc, chosen_desc->image.border.scale_by);
+ evas_object_image_border_scale_set(ep->object, TO_DOUBLE(sc2));
+ }
+ else
+ evas_object_image_border_scale_set(ep->object, TO_DOUBLE(sc));
+ }
else
evas_object_image_border_scale_set(ep->object, 1.0);
evas_object_image_border_set(ep->object, p3->type.common.spec.image.l, p3->type.common.spec.image.r,
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.border.b", image.border.b, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.border.no_fill", image.border.no_fill, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.border.scale", image.border.scale, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.border.scale_by", image.border.scale_by, EDJE_T_FLOAT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.smooth", image.fill.smooth, EET_T_CHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.pos_rel_x", image.fill.pos_rel_x, EDJE_T_FLOAT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.fill.pos_abs_x", image.fill.pos_abs_x, EET_T_INT);
int l, r, t, b; /* border scaling on image fill */
unsigned char no_fill; /* do we fill the center of the image if bordered? 1 == NO!!!! */
unsigned char scale; /* scale image border by same as scale factor */
+ FLOAT_T scale_by; /* when border scale above is enabled, border width OUTPUT is scaled by the object or global scale factor. this value adds another multiplier that the global scale is multiplued by first. if <= 0.0 it is not used, and if 1.0 it i s "ineffective" */
};
struct _Edje_Part_Description_Spec_Image