# Path: app/types.py



from dataclasses import dataclass
from ..types import Box, Dimensions



@dataclass
class Overlay:

    center_x: float = 0.5
    center_y: float = 0.5

    angle: float = 0.0

    scale: float = 0.25

    def get_size(self, background_size: Dimensions) -> Dimensions:
        background_width, background_height = background_size
        dimension = min(
            int(background_width * self.scale),
            int(background_height * self.scale),
        )
        return dimension, dimension

    def get_box(

# Path: app/types.py



# Path: app/models/overlay.py
from dataclasses import dataclass
from ..types import Box, Dimensions




@dataclass
class Overlay:

    center_x: float = 0.5
    center_y: float = 0.5

    angle: float = 0.0

    scale: float = 0.25

    def get_size(self, background_size: Dimensions) -> Dimensions:
        background_width, background_height = background_size
        dimension = min(
            int(background_width * self.scale),
            int(background_height * self.scale),
        )
        return dimension, dimension

    def get_box(

        self, background_size: Dimensions, foreground_size: Dimensions | None = None