def commit(self, overlay=True):
CheckParent(self.page)              <EOL>self.totalcont += self.text_cont<EOL>if not fitz_py2:                    <EOL><INDENT>self.totalcont = bytes(self.totalcont, "<STR_LIT:utf-8>")<EOL><DEDENT>xref = TOOLS._insert_contents(self.page, b"<STR_LIT:U+0020>", overlay)<EOL>self.doc._updateStream(xref, self.totalcont)<EOL>self.lastPoint  = None         <EOL>self.rect       = None         <EOL>self.draw_cont  = "<STR_LIT>"           <EOL>self.text_cont  = "<STR_LIT>"           <EOL>self.totalcont  = "<STR_LIT>"           <EOL>return<EOL>
Update the page's /Contents object with Shape data. The argument controls whether data appear in foreground (default) or background.