[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Erasing a Canvas

1) Do all of your drawing in the Paint event.
2) Use Canvas.redraw to force an area to be repainted.

If you are using SWT.NO_BACKGROUND you will have to draw every pixel (i.e. 
you will have to fill in the background too).

"Igor" <igor.dawg@xxxxxxxxx> wrote in message 
news:70750548e66911805974cc53913ef19b$1@xxxxxxxxxxxxxxxxxx
>
> hello,
>
> I'm having a problem with my app., in which I use canvases. let's say that 
> i have a number drawn in one of the canvases thru GC graphics, and I need 
> to draw a new number in that specific canvas, but when i do so, i can 
> still see the former number drawn underneath the new one. Is it possible 
> to simply erase the content of a canvas....so it cannot be seen anymore 
> and I can draw new stuff on it???
> (i checked out the API documentation a few times, but havent found any 
> methods how to do so....)
>
> Thanks very much.
> Best regards.
>
> Igor Rohal
>