Absolute
AbsolutePosition
Bases: BaseModel
Represents an absolute positioning.
type
class-attribute
instance-attribute
type: Literal['absolute'] = 'absolute'
The type of positioning. Defaults to "absolute".
from_relative
classmethod
from_relative(
position: RelativePosition, frame_size: FrameSize
) -> AbsolutePosition
Creates an absolute positioning from a relative positioning.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position |
RelativePosition
|
The relative positioning. |
required |
frame_size |
FrameSize
|
The size of the frame. |
required |
Returns:
Type | Description |
---|---|
AbsolutePosition
|
The absolute positioning. |
Source code in src/mosaico/positioning/absolute.py
from_region
classmethod
from_region(
position: RegionPosition, frame_size: FrameSize
) -> AbsolutePosition
Creates an absolute positioning from a region positioning.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
position |
RegionPosition
|
The region positioning. |
required |
frame_max_width |
The maximum width of the frame. |
required | |
frame_max_height |
The maximum height of the frame. |
required |
Returns:
Type | Description |
---|---|
AbsolutePosition
|
The absolute positioning. |