furrymyad pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=49344287ac1b2be7375b25a5830e2947a0ebbc92
commit 49344287ac1b2be7375b25a5830e2947a0ebbc92 Author: Vorobiov Vitalii <[email protected]> Date: Tue Jun 24 17:11:09 2014 +0300 Documentation: adding missed documentation to edcref (map.color param) Summary: There is param (of the map block in part's description) that allows user to set a color for specified vertex/point of that part. That param was undocumented so actually no one know that this param is exist and can be used in edj file. Two main fixes: - adding documentation for map.color param in edc reference. - adding .edc source code example for seeing how map.color param works. @fix Reviewers: cedric, Hermet, raster, seoz Reviewed By: cedric CC: cedric, reutskiy.v.v Differential Revision: https://phab.enlightenment.org/D1083 --- src/bin/edje/edje_cc_handlers.c | 26 +++++++++-- src/examples/edje/edje-map-color.edc | 89 ++++++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 4 deletions(-) diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index fa25cf0..2181b05 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -9486,17 +9486,17 @@ st_collections_group_parts_part_description_physics_face_source(void) perspective_on: 1; backface_cull: 1; alpha: 1; - + rotation { .. } } .. } - + @description @endblock - + @property perspective @parameters @@ -9653,7 +9653,7 @@ st_collections_group_parts_part_description_map_backface_cull(void) @effect Enable perspective when rotating even without a perspective point object. This would use perspective set for the object itself or for the - canvas as a whole as the global perspective with + canvas as a whole as the global perspective with edje_perspective_set() and edje_perspective_global_set(). @endproperty */ @@ -9665,6 +9665,24 @@ st_collections_group_parts_part_description_map_perspective_on(void) current_desc->map.persp_on = parse_bool(0); } +/** + @page edcref + @property + color + @parameters + [point] [red] [green] [blue] [alpha] + @effect + Set the color of a vertex in the map. + Colors will be linearly interpolated between vertex points through the map. + The default color of a vertex in a map is white solid (255, 255, 255, 255) + which means it will have no affect on modifying the part pixels. + Currently only four points are supported: + 0 - Left-Top point of a part. + 1 - Right-Top point of a part. + 2 - Left-Bottom point of a part. + 3 - Right-Bottom point of a part. + @endproperty +*/ static void st_collections_group_parts_part_description_map_color(void) { diff --git a/src/examples/edje/edje-map-color.edc b/src/examples/edje/edje-map-color.edc new file mode 100644 index 0000000..b4eb23e --- /dev/null +++ b/src/examples/edje/edje-map-color.edc @@ -0,0 +1,89 @@ +collections { + images{ + image: "bubble-blue.png" COMP; + } + group { + name: "map_example_group"; + parts { + part { + type: IMAGE; + name: "bg"; + description { + state: "default" 0.0; + image { + normal: "bubble-blue.png"; + } + rel1.relative: 0.25 0.25; + rel2.relative: 0.75 0.75; + } + } + part { + type: RECT; + name: "rectangle"; + description { + state: "default" 0.0; + color: 255 255 255 255; + map { + on: 1; + color: 0 0 0 0 0; + color: 1 255 255 255 255; + color: 2 255 255 255 255; + color: 3 255 255 255 255; + } + } + description { state: "moved" 0.0; + state: "moved" 0.0; + color: 255 255 255 255; + map { + on: 1; + color: 0 0 0 255 255; + color: 1 0 0 255 255; + color: 2 0 0 0 0; + color: 3 0 0 255 255; + } + } + description { + state: "rotated" 0.0; + color: 255 255 255 255; + map { + on: 1; + color: 0 0 125 255 255; + color: 1 255 0 255 128; + color: 2 0 125 255 255; + color: 3 255 0 255 128; + rotation { + x: 65.0; + y: 95.0; + z: 95.0; + } + } + } + } + } + programs { + program { + name: "start_program"; + signal: "load"; + source: ""; + transition: ACCELERATE 0.5; + action: STATE_SET "default" 0.0; + target: "rectangle"; + after: "continue_program"; + } + program { + name: "continue_program"; + transition: DECELERATE 3; + action: STATE_SET "moved" 0.0; + target: "rectangle"; + after: "rotate_program"; + } + program { + name: "rotate_program"; + transition: DECELERATE 4; + action: STATE_SET "rotated" 0.0; + target: "rectangle"; + after: "start_program"; + } + } + } +} --
