docs: Polish Efl.Canvas.Animation_*

Summary:
These docs were lacking a lot of detail.

Depends on D10562

Reviewers: bu5hm4n, cedric, zmike, Jaehyun_Cho

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10565
This commit is contained in:
Xavi Artigas 2019-11-04 13:06:41 +01:00
parent a1a77f5590
commit dc5ffbb866
4 changed files with 91 additions and 33 deletions

View File

@ -1,18 +1,25 @@
class @beta Efl.Canvas.Animation_Alpha extends Efl.Canvas.Animation class @beta Efl.Canvas.Animation_Alpha extends Efl.Canvas.Animation
{ {
[[Efl alpha animation class]] [[Animated alpha blending effect.
The @Efl.Canvas.Object will have its alpha (transparency) value multiplied by
this animation.
This can be used to create fade-in and fade-out transitions, for example.
]]
c_prefix: efl_animation_alpha; c_prefix: efl_animation_alpha;
data: Efl_Canvas_Animation_Alpha_Data; data: Efl_Canvas_Animation_Alpha_Data;
methods { methods {
@property alpha { @property alpha {
[[Alpha property]] [[Alpha range to animate. $[0.0] means the object is transparent and $[1.0] means
the object is opaque.
]]
set { set {
} }
get { get {
} }
values { values {
from_alpha: double; [[Alpha value when animation starts]] from_alpha: double; [[Initial alpha value.]]
to_alpha: double; [[Alpha value when animation ends]] to_alpha: double; [[Ending alpha value.]]
} }
} }
} }

View File

@ -1,33 +1,51 @@
class @beta Efl.Canvas.Animation_Rotate extends Efl.Canvas.Animation class @beta Efl.Canvas.Animation_Rotate extends Efl.Canvas.Animation
{ {
[[Efl rotate animation class]] [[Animated rotation effect.
The @Efl.Canvas.Object will rotate around a pivot point from one degree to another.
Coordinates for the pivot point can be relative to another object or absolute
(relative to the containing canvas).
Note: Changing an object's position using @Efl.Gfx.Entity.position while this
animation is running might lead to unexpected results.
]]
c_prefix: efl_animation_rotate; c_prefix: efl_animation_rotate;
data: Efl_Canvas_Animation_Rotate_Data; data: Efl_Canvas_Animation_Rotate_Data;
methods { methods {
@property rotate { @property rotate {
[[Rotate property]] [[Degree range to animate and pivot object.
The object will rotate from $from_degree to $to_degree around the pivot point.
All of the object's vertices (i.e. the corners, if it's a rectangular object)
will be rotated by these degrees, relative to the pivot point inside the pivot object.
The pivot point is another object $pivot plus an additional offset $center_point.
]]
set { set {
} }
get { get {
} }
values { values {
from_degree: double; [[Rotation degree when animation starts]] from_degree: double; [[Initial rotation (from 0 to 360). 0 means no rotation.]]
to_degree: double; [[Rotation degree when animation ends]] to_degree: double; [[Ending rotation (from 0 to 360). 0 means no rotation.]]
pivot: Efl.Canvas.Object; [[Pivot object for the center point. pivot: Efl.Canvas.Object; [[Object to use as pivot. $NULL means the animated object itself.]]
If the pivot object is $NULL, then the object is rotated on itself.]] center_point: Eina.Vector2; [[Position in pixels of the pivot point inside the pivot object.
center_point : Eina.Vector2; [[Relative coordinate of the center point.]] $[(0,0)] means the upper-left corner.]]
} }
} }
@property rotate_absolute { @property rotate_absolute {
[[Rotate absolute property]] [[Degree range to animate and absolute pivot point.
The object will rotate from $from_degree to $to_degree around the pivot point.
All of the object's vertices (i.e. the corners, if it's a rectangular object)
will be rotated by these degrees, relative to an absolute pivot point.
The pivot point is relative to the canvas.
]]
set { set {
} }
get { get {
} }
values { values {
from_degree: double; [[Rotation degree when animation starts]] from_degree: double; [[Initial rotation (from 0 to 360). 0 means no rotation.]]
to_degree: double; [[Rotation degree when animation ends]] to_degree: double; [[Ending rotation (from 0 to 360). 0 means no rotation.]]
center_pointer : Eina.Position2D; [[absolute coordinate of the center point.]] pivot_point : Eina.Position2D; [[Position of the pivot point relative to the canvas.]]
} }
} }
} }

View File

@ -1,33 +1,52 @@
class @beta Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation class @beta Efl.Canvas.Animation_Scale extends Efl.Canvas.Animation
{ {
[[Efl scale animation class]] [[Animated scaling effect.
The @Efl.Canvas.Object will have its size and position changed due to a scaling
operation around a specified pivot point.
Coordinates for the pivot point can be relative to the object or absolute
(relative to the containing canvas).
Note: Changing an object's geometry using @Efl.Gfx.Entity.position or @Efl.Gfx.Entity.size
while this animation is running might lead to unexpected results.
]]
c_prefix: efl_animation_scale; c_prefix: efl_animation_scale;
data: Efl_Canvas_Animation_Scale_Data; data: Efl_Canvas_Animation_Scale_Data;
methods { methods {
@property scale { @property scale {
[[Scale property]] [[Scale range and pivot object.
The object's scale will change from $from_scale to $to_scale.
All of the object's vertices (i.e. the corners, if it's a rectangular object)
will be multiplied by this scale, relative to the pivot point inside the pivot object.
The pivot point is another object $pivot plus an additional offset $center_point.
]]
set { set {
} }
get { get {
} }
values { values {
from_scale : Eina.Vector2; [[Scale factor when animation starts]] from_scale: Eina.Vector2; [[Initial scale value.]]
to_scale : Eina.Vector2; [[Scale factor when animation ends]] to_scale: Eina.Vector2; [[Ending scale value.]]
pivot: Efl.Canvas.Object; [[Pivot object for the center point. If the pivot object is $NULL, then the object pivot: Efl.Canvas.Object; [[Object to use as pivot. $NULL means the animated object itself.]]
is scaled on itself.]] center_point: Eina.Vector2; [[Position in pixels of the pivot point inside the pivot object.
pivot_pos : Eina.Vector2; [[Relative coordinates of the center point. 0.0,0.0 is upper left.]] $[(0,0)] means the upper-left corner.]]
} }
} }
@property scale_absolute { @property scale_absolute {
[[Scale absolute property]] [[Scale range and pivot position, relative to the canvas.
The object's scale will change from $from_scale to $to_scale.
All of the object's vertices (i.e. the corners, if it's a rectangular object)
will be multiplied by this scale, relative to the pivot point.
The pivot point is relative to the canvas.
]]
set { set {
} }
get { get {
} }
values { values {
from_scale : Eina.Vector2; [[Scale factor when animation starts]] from_scale: Eina.Vector2; [[Initial scale value.]]
to_scale : Eina.Vector2; [[Scale factor when animation ends]] to_scale: Eina.Vector2; [[Ending scale value.]]
pos : Eina.Position2D; [[Absolut coordinates in canvas space]] pivot_point: Eina.Position2D; [[Position of the pivot point relative to the canvas.]]
} }
} }
} }

View File

@ -1,29 +1,43 @@
class @beta Efl.Canvas.Animation_Translate extends Efl.Canvas.Animation class @beta Efl.Canvas.Animation_Translate extends Efl.Canvas.Animation
{ {
[[Efl translate animation class]] [[Animated translation effect.
The @Efl.Canvas.Object will move from one point to another.
Coordinates for the origin and destination points can be relative to the object
or absolute (relative to the containing canvas).
Note: Changing an object's position using @Efl.Gfx.Entity.position while this
animation is running might lead to unexpected results.
]]
c_prefix: efl_animation_translate; c_prefix: efl_animation_translate;
data: Efl_Canvas_Animation_Translate_Data; data: Efl_Canvas_Animation_Translate_Data;
methods { methods {
@property translate { @property translate {
[[Translate property]] [[Translation vector, relative to the starting position of the object.
So, for example, if $from is $[(0,0)], the object will move from its
current position to $to.
]]
set { set {
} }
get { get {
} }
values { values {
from : Eina.Position2D; [[Position moved when animation starts.]] from : Eina.Position2D; [[Relative initial position.]]
to : Eina.Position2D; [[Position moved when animation ends.]] to : Eina.Position2D; [[Relative ending position.]]
} }
} }
@property translate_absolute { @property translate_absolute {
[[Translate absolute property]] [[Translation vector, relative to the canvas.
So, for example, if $from is $[(0,0)], the object will always start from the
origin of the canvas, regardless of the current object position.
]]
set { set {
} }
get { get {
} }
values { values {
from : Eina.Position2D; [[The position where the animation starts.]] from : Eina.Position2D; [[Absolute initial position.]]
to : Eina.Position2D; [[The position where the animation stops.]] to : Eina.Position2D; [[Absolute ending position.]]
} }
} }
} }