[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
SWT - custom widget development - how to double buffer?
|
hi all,
I'm developing a custom widget extending canvas. I have void
paintControl(PaintEvent e) method, and in the method, i first create and
offscreen image
Rectangle rClient = getClientArea();
Image off = new Image(getDisplay(), rClient.width, rClient.height);
GC gc = new GC(off);
then, draw on this gc, and copy it back to paintevent.gc
e.gc.drawImage(off, 0, 0);
gc.dispose();
off.dispose();
problem is, this drawImage method is too slow, still client area is
flickering. is there a better way to do that?
thanx,
ozgur