New topic: minimise canvas paint events
<http://forums.realsoftware.com/viewtopic.php?t=47826> Page 1 of 1 [ 5 posts ] Previous topic | Next topic Author Message d_tran Post subject: minimise canvas paint eventsPosted: Wed May 08, 2013 8:14 pm Joined: Thu Feb 03, 2011 4:15 pm Posts: 2 I'm creating simple graphs in a canvas. The canvas paint event fires multiple times with each screen refresh. This is not a problem when only a few hundred points are being plotted, but the time to display tens of thousands of points is unaccepatble. Is there som way to have the canvas paint event only fire once? Thanks Brian Top timhare Post subject: Re: minimise canvas paint eventsPosted: Wed May 08, 2013 10:35 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 12311 Location: Portland, OR USA It usually does fire only once. Do you have controls that overlap the canvas? Are you calling Refresh in more than one place? Top d_tran Post subject: Re: minimise canvas paint eventsPosted: Thu May 09, 2013 6:15 pm Joined: Thu Feb 03, 2011 4:15 pm Posts: 2 Thanks for thte thought Tim. There are no controls that overlap the canvas. I do have a couple that come to 1 pixel outside the canvas, both to the left of the canvas and below the canvas. Canvas painting is done by a button that fires the refresh method. Both self.refresh and canvas.refresh have been tested. Self.refresh is being used because with canvas.refresh controls to the left of the canvas are no longer visible. Running 2011r4.1 Brian Top DaveS Post subject: Re: minimise canvas paint eventsPosted: Thu May 09, 2013 8:38 pm Joined: Sun Aug 05, 2007 10:46 am Posts: 4863 Location: San Diego, CA Try replacing REFRESH with INVALIDATE instead _________________ Dave Sisemore iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1 Note : I am not interested in any solutions that involve custom Plug-ins of any kind Top timhare Post subject: Re: minimise canvas paint eventsPosted: Thu May 09, 2013 9:24 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 12311 Location: Portland, OR USA d_tran wrote:I do have a couple that come to 1 pixel outside the canvas, both to the left of the canvas and below the canvas. That is too close. I think you need 2 px minimum, maybe more. 1 pixel away is the same as overlapping, on Windows. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 5 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
