[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: GC.drawImage()
|
Try adding the style bit SWT.NO_BACKGROUND to your canvas. The canvas won't
be repainted automatically at all, so you need to ensure that YOU do this;
unless your image ALWAYS COMPLETELY fills the canvas (no empty spaces).
Typical bad behaviour on your part would be background windows bleeding
through (transparency effects) ...
--
--------------------------------------
Patrick_Mueller@xxxxxxx
--------------------------------------
"Thomas Mäder" <thomas_maeder@xxxxxxx> wrote in message
news:3ADEEC32.67398288@xxxxxxxxxx
> I'm not an SWT hacker, but you could try this:
>
> 1) use GC.copy(int, int, int, int, int, int, int, int) to copy the area of
the
> image that is still visible in the new scroll position
> 2) only draw the part of the image that has become newly visible because
of
> the scrolling.
>
> but perhaps an SWT guy has a better way?
>
> Thomas
>
> Pratik Shah wrote:
>
> > I have a scrollable canvas where I display an image. But, the image
> > flickers badly when I scroll. It seems the drawImage() method of GC is
> > pretty slow. Is that true? Anybody else have any similar problems?
Know
> > of any solution?
> >
> > Pratik Shah
>