Failing to update pygame surfaces
<p>I'm making a pygame game. I have 3 surfaces: <code>gameDisplay</code> (where the character and background is directly rendered to), <code>guiSurf</code> and <code>invSurf</code>
I have a clock made in core pyhon which displays the game time with the pygame font. I blit the clock to <code>guiSurf</code> and then in my gameloop I blit <code>guiSurf</code> and <code>invSurf</code> to <code>gameDisplay</code>. My problem is that the clock leaves a mark from where it was. IE when it changes from '07:00' to '07:01', the '01' is ontop of the '00' which shouldn't be there. I would post the code but theres like 400 lines. Does anyone have any idea what I may of done wrong. <a href="http://gyazo.com/5716aeda3a5769aac7af985db6907caa.png" rel="nofollow">Link to a picture of the clock</a></p>

<p>Visibly, the clock is blitted twice on the guiSurf. And I guess it keeps stacking the previous image of time (7:00, then 7:01, then 7.02 and so on). You need to clear the surface holding the clock before drawing time into it : <code>clock_surf.fill(clearcolor, clock_surf.get_rect())</code>.</p>

python python-3.x pygame python-3.5 pygame-surface