summaryrefslogtreecommitdiff
path: root/src/bin/edje
diff options
context:
space:
mode:
authorperepelits.m <perepelits.m@samsung.com>2015-02-20 11:31:09 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-20 11:31:14 +0100
commit3dda07dbce7de384b887a1ce1c27dee5ec92c2ad (patch)
treec23e732518d5374f92d03470076a9e4777f1e153 /src/bin/edje
parent6749348325e159ade2d0840c5df08c9f2ef66c2a (diff)
edje: add camera properties to edje_cc.
Summary: Filling of "fovy", "aspect", "near" and "far". @feature Reviewers: raster, Hermet, cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1988 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_cc_handlers.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 435e92aa76..86316fb528 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -365,6 +365,7 @@ static void st_collections_group_parts_part_description_proxy_source_visible(voi
365static void st_collections_group_parts_part_description_proxy_source_clip(void); 365static void st_collections_group_parts_part_description_proxy_source_clip(void);
366static void st_collections_group_parts_part_description_position_point(void); 366static void st_collections_group_parts_part_description_position_point(void);
367static void st_collections_group_parts_part_description_position_space(void); 367static void st_collections_group_parts_part_description_position_space(void);
368static void st_collections_group_parts_part_description_camera_properties(void);
368 369
369#ifdef HAVE_EPHYSICS 370#ifdef HAVE_EPHYSICS
370static void st_collections_group_parts_part_description_physics_mass(void); 371static void st_collections_group_parts_part_description_physics_mass(void);
@@ -717,6 +718,7 @@ New_Statement_Handler statement_handlers[] =
717 {"collections.group.parts.part.description.proxy.source_clip", st_collections_group_parts_part_description_proxy_source_clip}, 718 {"collections.group.parts.part.description.proxy.source_clip", st_collections_group_parts_part_description_proxy_source_clip},
718 {"collections.group.parts.part.description.position.point", st_collections_group_parts_part_description_position_point}, 719 {"collections.group.parts.part.description.position.point", st_collections_group_parts_part_description_position_point},
719 {"collections.group.parts.part.description.position.space", st_collections_group_parts_part_description_position_space}, 720 {"collections.group.parts.part.description.position.space", st_collections_group_parts_part_description_position_space},
721 {"collections.group.parts.part.description.properties.perspective", st_collections_group_parts_part_description_camera_properties},
720 722
721#ifdef HAVE_EPHYSICS 723#ifdef HAVE_EPHYSICS
722 {"collections.group.parts.part.description.physics.mass", st_collections_group_parts_part_description_physics_mass}, 724 {"collections.group.parts.part.description.physics.mass", st_collections_group_parts_part_description_physics_mass},
@@ -9081,6 +9083,59 @@ st_collections_group_parts_part_description_position_space(void)
9081 } 9083 }
9082} 9084}
9083 9085
9086/**
9087 @edcsubsection{collections_group_parts_description_camera,Properties}
9088 */
9089
9090/**
9091 @page edcref
9092
9093 @block
9094 properties
9095 @context
9096 part {
9097 description {
9098 ..
9099 properties {
9100 perspective: fovy aspect near far;
9101 }
9102 ..
9103 }
9104 }
9105 @description
9106 @endblock
9107
9108 @property
9109 properties
9110 @parameters
9111 [fovy] [aspect] [near] [far]
9112 @effect
9113 Specifies the basic attributes of the camera.
9114 @endproperty
9115*/
9116static void
9117st_collections_group_parts_part_description_camera_properties(void)
9118{
9119 Edje_Part_Description_Camera *ed;
9120
9121 check_arg_count(4);
9122
9123 if (current_part->type != EDJE_PART_TYPE_CAMERA)
9124 {
9125 ERR("parse error %s:%i. camera attributes in non-CAMERA part.",
9126 file_in, line - 1);
9127 exit(-1);
9128 }
9129
9130 ed = (Edje_Part_Description_Camera*) current_desc;
9131
9132 ed->camera.camera.fovy = FROM_DOUBLE(parse_float(0));
9133 ed->camera.camera.aspect = FROM_DOUBLE(parse_float(1));
9134 ed->camera.camera.near = FROM_DOUBLE(parse_float(2));
9135 ed->camera.camera.far = FROM_DOUBLE(parse_float(3));
9136}
9137
9138
9084static void 9139static void
9085st_collections_group_parts_part_description_proxy_source_visible(void) 9140st_collections_group_parts_part_description_proxy_source_visible(void)
9086{ 9141{