def METHOD_NAME(self, wdg, ctx: cairo.Context, *args):
    if self.surface:
        wdg.set_size_request(self.surface.get_width(), self.surface.get_height())
        ctx.fill()
        ctx.set_source_surface(self.surface, 0, 0)
        ctx.get_source().set_filter(cairo.Filter.NEAREST)
        ctx.paint()
    return True