Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Antialiased rendering on a transparent image

After searching Google for relevant examples and posting on SWT forum and getting no replies, i'm finally turning to the "source".

Is it possible to create a fully transparent SWT image and then render antialiased text or other primitives (such as lines) on it? If i just mark one color as transparent, it will not mark the anti-aliased pixels around the text as having partial translucency - or perhaps this is an expected result with subpixel rendering? Or perhaps the subpixel rendering expects the background color / texture to be present in order to create the correct blended text pixels?

What i'm looking for is to create an SWT image, render some text and then iterate over the pixels of the SWT image, expecting alpha value to be 0 where there is no text, 255 where there is a full pixel and between 0 and 255 in the pixels around the text.

Hope this makes sense.

Thanks
Kirill



Never miss a thing. Make Yahoo your homepage.

Back to the top