from raspberry_home.view.geometry import Size
from raspberry_home.view.render import RenderContext
from raspberry_home.view.view import View, Point


class Offset(View):

    def __init__(self, offset: Point, child: View):
        self.offset = offset
        self.child = child

    def content_size(self, container_size: Size) ->Size:
        return self.child.content_size(container_size)

    def render(self, context: RenderContext):
        self.child.render(context.copy(origin=context.origin + self.offset))

bfb3ea9456c20868f30888e1175bce6c4bea851f
<mask token>


class Offset(View):
    <mask token>

    def content_size(self, container_size: Size) ->Size:
        return self.child.content_size(container_size)
    <mask token>

<mask token>


class Offset(View):

    def __init__(self, offset: Point, child: View):
        self.offset = offset
        self.child = child

    def content_size(self, container_size: Size) ->Size:
        return self.child.content_size(container_size)
    <mask token>

<mask token>


class Offset(View):

    def __init__(self, offset: Point, child: View):
        self.offset = offset
        self.child = child

    def content_size(self, container_size: Size) ->Size:
        return self.child.content_size(container_size)

    def render(self, context: RenderContext):
        self.child.render(context.copy(origin=context.origin + self.offset))

from raspberry_home.view.geometry import Size
from raspberry_home.view.render import RenderContext
from raspberry_home.view.view import View, Point


class Offset(View):

    def __init__(self, offset: Point, child: View):
        self.offset = offset
        self.child = child

    def content_size(self, container_size: Size) ->Size:
        return self.child.content_size(container_size)

    def render(self, context: RenderContext):
        self.child.render(context.copy(origin=context.origin + self.offset))
