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
This commit is contained in:
parent
aa5e2c6132
commit
49344287ac
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue