|
From: Jody G. <jod...@gm...> - 2010-05-11 10:00:17
|
Okay I get it ... What uDig does is add a render callback; and every 100 or so draw callbacks is asks its UI thread to draw the image to the screen again. It is actually a bit more complicated in that we have a timer that will draw after 1,3,5, 5, 5 seconds; and the renderer is used to set a flag - and if the timer sees the flag it will redraw the image onto the screen. But when it actualy draws it does a simple gc.drawImage ... Jody On 11/05/2010, at 5:25 PM, LSA wrote: > Hi Jody, > > >> - Draw the image as geotools is drawing into it... this is what uDig does. > > Can you please supply me with a code sample regarding how uDig does that? We really need this feature, our customers dislike the time lag (datasets are large). > > Thanks, > Sergey > > On 5/6/2010 11:03 PM, Jody Garnett wrote: >> >> Yes; a couple of ways. >> - Draw the image as geotools is drawing into it... this is what uDig does. >> - Get a volatile image and use that to draw into. It is tricky Java 2D programming (because you need to redraw if windows are moved in front of your image) but it is effective. >> >> Jody >> >> On 07/05/2010, at 12:26 AM, LSA wrote: >> >> >>> As far as I know, default geotools drawing mode is to draw on offline >>> buffer and then render this buffer to the screen. On the opposing side, >>> OpenJump (for example) draws everythink it can draw immediately. >>> This give user the feeling of more responsive interface, because hey - >>> something is going on my screen. So if one will draw streets dataset >>> he/she will notice how streets are being rendered one by one. >>> >>> Is it possible to do something similar for the geotools, I mean to draw >>> every feature obtained for drawing immediately to user, not to offscreen >>> buffer? >>> >>> Thanks in advance! >>> >>> ------------------------------------------------------------------------------ >>> _______________________________________________ >>> Geotools-gt2-users mailing list >>> Geo...@li... >>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >>> >> > |