movis.transform.TransformValue#
- class movis.transform.TransformValue(anchor_point: tuple[float, float] = (0.0, 0.0), position: tuple[float, float] = (0.0, 0.0), scale: tuple[float, float] = (1.0, 1.0), rotation: float = 0.0, opacity: float = 1.0, origin_point: Direction = Direction.CENTER, blending_mode: BlendingMode = BlendingMode.NORMAL)[source]#
A named tuple that encapsulates various transformation properties that can be applied to a layer.
The properties of TransformValue include the anchor point, position, scale, rotation, opacity, and origin point.
- Attributes:
- anchor_point:
A tuple of two floats representing the anchor point
(x, y)of an object. Defaults to(0.0, 0.0).- position:
A tuple of two floats representing the position
(x, y)of an object. Defaults to(0.0, 0.0).- scale:
A tuple of two floats representing the scale
(x, y)of an object. Defaults to(1.0, 1.0).- rotation:
A float value representing the rotation angle in degrees. Defaults to
0.0.- opacity:
A float value representing the opacity of an object. Must be in the range
[0, 1]. Defaults to1.0.- origin_point:
An enum value from Direction representing the origin point for transformations. Defaults to
Direction.CENTER.- origin_point:
An enum value from Direction representing the blending mode of the layer. Defaults to
BlendingMode.NORMAL.
Methods
- count(value, /)#
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
Attributes
anchor_pointAlias for field number 0
blending_modeAlias for field number 6
opacityAlias for field number 4
origin_pointAlias for field number 5
positionAlias for field number 1
rotationAlias for field number 3
scaleAlias for field number 2