forked from enlightenment/efl
64 lines
2.5 KiB
Plaintext
64 lines
2.5 KiB
Plaintext
import eina_types;
|
|
|
|
class Efl.Canvas.Scale_Animation extends Efl.Canvas.Animation
|
|
{
|
|
[[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.
|
|
|
|
@since 1.24
|
|
]]
|
|
c_prefix: efl_animation_scale;
|
|
data: Efl_Canvas_Scale_Animation_Data;
|
|
methods {
|
|
@property scale {
|
|
[[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 {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
from_scale: Eina.Vector2; [[Initial scale value.]]
|
|
to_scale: Eina.Vector2; [[Ending scale value.]]
|
|
pivot: Efl.Canvas.Object; [[Object to use as pivot. $NULL means the animated object itself.]]
|
|
center_point: Eina.Vector2; [[Position in pixels of the pivot point inside the pivot object.
|
|
$[(0,0)] means the upper-left corner.]]
|
|
}
|
|
}
|
|
@property scale_absolute {
|
|
[[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 {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
from_scale: Eina.Vector2; [[Initial scale value.]]
|
|
to_scale: Eina.Vector2; [[Ending scale value.]]
|
|
pivot_point: Eina.Position2D; [[Position of the pivot point relative to the canvas.
|
|
If $null the target passed to @Efl.Canvas.Animation.animation_apply
|
|
is used as pivot element.]]
|
|
}
|
|
}
|
|
}
|
|
implements {
|
|
Efl.Object.constructor;
|
|
Efl.Canvas.Animation.animation_apply;
|
|
}
|
|
}
|