def rendering_finished(self, size, frame, cairo_ctx):
surface = cairo_ctx.get_target()<EOL>if self.format == '<STR_LIT>':<EOL><INDENT>surface.write_to_png(self._output_file(frame))<EOL><DEDENT>surface.finish()<EOL>surface.flush()<EOL>
Called when CairoCanvas has rendered a bot