edje: add align 3d support.

Summary: Adding of Z axis to be aligned

Reviewers: cedric, raster, Hermet

Subscribers: cedric, artem.popov

Differential Revision: https://phab.enlightenment.org/D2368

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
perepelits.m 2015-04-16 19:29:01 +02:00 committed by Cedric BAIL
parent 970afe9bea
commit 83bb3b5b51
1 changed files with 17 additions and 6 deletions

View File

@ -6377,6 +6377,9 @@ ob_collections_group_parts_part_description(void)
ed->minmul.have = 1; ed->minmul.have = 1;
ed->minmul.w = FROM_INT(1); ed->minmul.w = FROM_INT(1);
ed->minmul.h = FROM_INT(1); ed->minmul.h = FROM_INT(1);
ed->align_3d.x = FROM_DOUBLE(0.5);
ed->align_3d.y = FROM_DOUBLE(0.5);
ed->align_3d.z = FROM_DOUBLE(0.5);
} }
static void static void
@ -6870,7 +6873,7 @@ st_collections_group_parts_part_description_limit(void)
@property @property
align align
@parameters @parameters
[X axis] [Y axis] [X axis] [Y axis] ([Z axis])
@effect @effect
When the displayed object's size is smaller (or bigger) than When the displayed object's size is smaller (or bigger) than
its container, this property moves it relatively along both its container, this property moves it relatively along both
@ -6878,16 +6881,24 @@ st_collections_group_parts_part_description_limit(void)
the object touching container's respective ones, while @c the object touching container's respective ones, while @c
"1.0" stands for right/bottom edges of the object (on "1.0" stands for right/bottom edges of the object (on
horizonal/vertical axis, respectively). The default value is horizonal/vertical axis, respectively). The default value is
@c "0.5 0.5". @c "0.5 0.5". There is one more parametr for Z axis in case
of MESH_NODE.
@endproperty @endproperty
*/ */
static void static void
st_collections_group_parts_part_description_align(void) st_collections_group_parts_part_description_align(void)
{ {
check_arg_count(2); if (get_arg_count() == 2)
{
current_desc->align.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0)); current_desc->align.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0));
current_desc->align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0)); current_desc->align.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0));
}
else if (get_arg_count() == 3)
{
current_desc->align_3d.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1.0));
current_desc->align_3d.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1.0));
current_desc->align_3d.z = FROM_DOUBLE(parse_float_range(2, 0.0, 1.0));
}
} }
/** /**