def do_drawing(self, size, frame, cairo_ctx):
if self.get_window() and not self.bot_size:<EOL><INDENT>self.set_size_request(*size)<EOL><DEDENT>self.bot_size = size<EOL>self.backing_store = BackingStore.get_backingstore(self.width, self.height)<EOL>cr = pycairo.Context(self.backing_store.surface)<EOL>if self.scale_fit:<EOL><INDENT>self.scale_context_and_center(cr)<EOL><DEDENT>cairo_ctx = driver.ensure_pycairo_context(cairo_ctx)<EOL>cr.set_source_surface(cairo_ctx.get_target())<EOL>cr.set_operator(cairo.OPERATOR_SOURCE)<EOL>cr.paint()<EOL>self.queue_draw()<EOL>while Gtk.events_pending():<EOL><INDENT>Gtk.main_iteration_do(False)<EOL><DEDENT>
Update the backing store from a cairo context and
schedule a redraw (expose event)

:param size: width, height in pixels of bot
:param frame: frame # thar was drawn
:param cairo_ctx: cairo context the bot was drawn on