def METHOD_NAME(self, event):
    # Set canvas viewport and reconfigure visual transforms to match.
    vp = (0, 0, self.physical_size[0], self.physical_size[1])
    self.context.set_viewport(*vp)
    for vis in self.visuals:
        vis.transforms.configure(canvas=self, viewport=vp)