edje: support anti_alias option
set anti_alias in part section. default is enabled. part { name: "test"; type: XXX; anti_alias: 0; ... } @feature
This commit is contained in:
parent
956754ee57
commit
382c41e42d
|
@ -244,6 +244,7 @@ static void st_collections_group_parts_part_insert_before(void);
|
|||
static void st_collections_group_parts_part_insert_after(void);
|
||||
static void st_collections_group_parts_part_effect(void);
|
||||
static void st_collections_group_parts_part_mouse_events(void);
|
||||
static void st_collections_group_parts_part_anti_alias(void);
|
||||
static void st_collections_group_parts_part_repeat_events(void);
|
||||
static void st_collections_group_parts_part_ignore_flags(void);
|
||||
static void st_collections_group_parts_part_scale(void);
|
||||
|
@ -575,6 +576,7 @@ New_Statement_Handler statement_handlers[] =
|
|||
{"collections.group.parts.part.insert_after", st_collections_group_parts_part_insert_after},
|
||||
{"collections.group.parts.part.effect", st_collections_group_parts_part_effect},
|
||||
{"collections.group.parts.part.mouse_events", st_collections_group_parts_part_mouse_events},
|
||||
{"collections.group.parts.part.anti_alias", st_collections_group_parts_part_anti_alias},
|
||||
{"collections.group.parts.part.repeat_events", st_collections_group_parts_part_repeat_events},
|
||||
{"collections.group.parts.part.ignore_flags", st_collections_group_parts_part_ignore_flags},
|
||||
{"collections.group.parts.part.scale", st_collections_group_parts_part_scale},
|
||||
|
@ -3049,6 +3051,7 @@ _part_copy(Edje_Part *ep, Edje_Part *ep2)
|
|||
|
||||
ep->type = ep2->type;
|
||||
ep->mouse_events = ep2->mouse_events;
|
||||
ep->anti_alias = ep2->anti_alias;
|
||||
ep->repeat_events = ep2->repeat_events;
|
||||
ep->ignore_flags = ep2->ignore_flags;
|
||||
ep->scale = ep2->scale;
|
||||
|
@ -4087,6 +4090,7 @@ edje_cc_handlers_part_make(int id)
|
|||
ep->id = id;
|
||||
ep->type = EDJE_PART_TYPE_IMAGE;
|
||||
ep->mouse_events = pcp->default_mouse_events;
|
||||
ep->anti_alias = 1;
|
||||
ep->repeat_events = 0;
|
||||
ep->ignore_flags = EVAS_EVENT_FLAG_NONE;
|
||||
ep->scale = 0;
|
||||
|
@ -4796,6 +4800,24 @@ st_collections_group_parts_part_nomouse(void)
|
|||
current_part->mouse_events = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@page edcref
|
||||
@property
|
||||
anti_alias
|
||||
@parameters
|
||||
[1 or 0]
|
||||
@effect
|
||||
Takes a boolean value specifying whether part is anti_alias (1) or not
|
||||
(0). The default value is 1.
|
||||
@endproperty
|
||||
*/
|
||||
static void
|
||||
st_collections_group_parts_part_anti_alias(void)
|
||||
{
|
||||
check_arg_count(1);
|
||||
current_part->anti_alias = parse_bool(0);
|
||||
}
|
||||
|
||||
/**
|
||||
@page edcref
|
||||
@property
|
||||
|
|
|
@ -396,6 +396,7 @@ _edje_edd_old_init(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "type", type, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "effect", effect, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "mouse_events", mouse_events, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "anti_alias", anti_alias, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "repeat_events", repeat_events, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "ignore_flags", ignore_flags, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part, Old_Edje_Part, "scale", scale, EET_T_UCHAR);
|
||||
|
|
|
@ -580,7 +580,6 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
|
|||
epd2 = _edje_part_description_find(ed, ep, d2, v2, EINA_TRUE);
|
||||
|
||||
epdi = (Edje_Part_Description_Image*) epd2;
|
||||
|
||||
/* There is an animation if both description are different or if description is an image with tweens */
|
||||
if (epd2 && (epd1 != epd2 || (ep->part->type == EDJE_PART_TYPE_IMAGE && epdi->image.tweens_count)))
|
||||
{
|
||||
|
|
|
@ -1021,6 +1021,7 @@ _edje_edd_init(void)
|
|||
#endif
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "effect", effect, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "mouse_events", mouse_events, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "anti_alias", anti_alias, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "repeat_events", repeat_events, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "ignore_flags", ignore_flags, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "scale", scale, EET_T_UCHAR);
|
||||
|
|
|
@ -3032,6 +3032,7 @@ _edje_edit_real_part_add(Evas_Object *obj, const char *name, Edje_Part_Type type
|
|||
ep->name = eina_stringshare_add(name);
|
||||
ep->mouse_events = 1;
|
||||
ep->repeat_events = 0;
|
||||
ep->anti_alias = 1;
|
||||
ep->ignore_flags = EVAS_EVENT_FLAG_NONE;
|
||||
ep->pointer_mode = EVAS_OBJECT_POINTER_MODE_AUTOGRAB;
|
||||
ep->precise_is_inside = 0;
|
||||
|
|
|
@ -655,8 +655,9 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
|||
evas_object_pass_events_set(rp->object, 1);
|
||||
evas_object_pointer_mode_set(rp->object, EVAS_OBJECT_POINTER_MODE_NOGRAB);
|
||||
}
|
||||
if (ep->precise_is_inside)
|
||||
evas_object_precise_is_inside_set(rp->object, 1);
|
||||
eo_do(rp->object,
|
||||
evas_obj_anti_alias_set(ep->anti_alias),
|
||||
evas_obj_precise_is_inside_set(ep->precise_is_inside));
|
||||
}
|
||||
if (rp->part->clip_to_id < 0)
|
||||
evas_object_clip_set(rp->object, ed->base->clipper);
|
||||
|
|
|
@ -1085,6 +1085,7 @@ struct _Edje_Part
|
|||
unsigned char effect; /* 0 = plain... */
|
||||
unsigned char mouse_events; /* it will affect/respond to mouse events */
|
||||
unsigned char repeat_events; /* it will repeat events to objects below */
|
||||
unsigned char anti_alias;
|
||||
Evas_Event_Flags ignore_flags;
|
||||
unsigned char scale; /* should certain properties scale with edje scale factor? */
|
||||
Edje_3D_Vec scale_3d;
|
||||
|
|
|
@ -5136,9 +5136,9 @@ _edje_real_part_swallow(Edje *ed,
|
|||
else
|
||||
evas_object_pass_events_set(obj_swallow, 1);
|
||||
_edje_callbacks_focus_add(rp->typedata.swallow->swallowed_object, ed, rp);
|
||||
|
||||
if (rp->part->precise_is_inside)
|
||||
evas_object_precise_is_inside_set(obj_swallow, 1);
|
||||
eo_do(obj_swallow,
|
||||
evas_obj_anti_alias_set(rp->part->anti_alias),
|
||||
evas_obj_precise_is_inside_set(rp->part->precise_is_inside));
|
||||
|
||||
ed->dirty = EINA_TRUE;
|
||||
ed->recalc_call = EINA_TRUE;
|
||||
|
|
Loading…
Reference in New Issue