Found it ..... If I use
client.Canvas.ClearAll(False) instead of the default (which is true) the original bounding box does not get cleared. Glad you had that covered Chris Cheers - David -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Poundall Sent: 30 December 2007 15:38 To: 'Christopher Barker'; 'Mailing List for the wxPython Float Canvas.' Subject: Re: [fc] How to cleanly refresh a canvas? Hi Chris --------------------------------------------------------------- >> I am trying to redraw the canvas but without zooming to the BB. Just >> forcing a draw mucks up my drawing scale > > That shouldn't happen. FloatCanvas.Draw() should jsut re-draw, and not > mess with the scale or anything -- where are you calling it? To clarify, the redraw occurs but the screen centre moves to a different location on the draw. This is how I call it client.Canvas.ClearAll() .... work a few objects to be drawn to the canvas Stick them in a paint list (plist) for p in plist: self.dl_AddObjectToCanvas(client,p[2],p[3]) client.Canvas.Draw(True) p[2] and p[3] are args and kwargs for each object on the canvas. Because it is a complete redraw of the canvas do I also need to propagate a centre screen parameter ? I don't want to use zoom to BB because I may be doing a close in edit when I cause the Draw to occur, by that I mean that I don't want to have to keep zooming back into the working area every time I do a change. ---------------------------------------------------------------- >> and refresh on it’s own gives me a black canvas. > > hmm. that's a bit odd too. Refresh() should just re-blit the existing > buffer. Oops - my mistake I wasn't doing a Draw or zoom to BB prior to using refresh. Thanks in advance - David No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27 _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27 No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.17.12/1202 - Release Date: 29/12/2007 13:27 _______________________________________________ FloatCanvas mailing list [email protected] http://mail.mithis.com/cgi-bin/mailman/listinfo/floatcanvas
