[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Building on SWT Paint

Hi Monica,

To clarify (one more time ;-)), the existing figures are rectangles filled
with some colour, and they exist on your Canvas before the image is drawn,
right?  If so, then there isn't a way to do this, other than looking at the
pre-existing figures and (assuming rectangles) re-drawing them on the image
using GC.drawRectangle(...) (instead of GC.fillRectangle(...) as they were
presumably created with).  Transparent pixels can be set on images, but not
on the fill of drawn shapes, since GC.draw*(...) already draws shapes
without fill.

Grant


"Monica" <ggamh@xxxxxxxx> wrote in message
news:fcf642e845eb0d5e1bfbaef57f09231d$1@xxxxxxxxxxxxxxxxxx
> Hi Andreas,
>
> thanks for the response and sorry for not being clear (I am absolutely new
> to swt).
> So I am trying to use SWT Paint example code and add some features to it.
> I need it to be able to display an image and I want to be able to draw the
> existing figures on top of the image.
> However, as it is now, it draws figures but they are all filled with white
> - not sure why. I thought that I have to specify that the background of
> the figure I am drawing is transparent so it picks up the image that I am
> drawing on?
> Hope that clarifies things and hope you can help.
>
> Thanks :)
>
>