Giving up for now

Joel Holdsworth joel at airwebreathe.org.uk
Mon May 4 03:50:09 CDT 2009


On Sun, 2009-05-03 at 16:05 +0200, Roderick Colenbrander wrote:
> We do support some alpha support using XRender, can't you use this
> too? I think that's the general method for using alpha at the moment
> on X.

Yes and I'm using GdiAlphaBlend - for rendering, and I have fixes to use
it. It's what you need to enable DrawIcon and DrawIconEx to draw
properly.

The reason is to do with the way *loading* works. Icons get loaded in
arbitrary sizes and colour depths, but of course only compatible
HBITMAPs can be displayed e.g. a 4-bit icon has to be upsampled to
32-bit before it can be displayed on my system. As a solution to both
these problems CURSORICON_CreateIconFromBMI has an internal call to
StretchDIBits, which applies both depth and size conversions. The
problem is that this call seems to loose the alpha channel in doing so.

I guess I should write a test to find out what StretchDIBits *should* do
- whether we can use it, even theoretically.

Once we get to the stage of returning a full formed HICON to the app,
it's plain sailing. My DrawIcon patch can render alpha channel icons no
problem, and hopefully a DrawIconEx patch will soon follow. The problem
is that the only way to create one in wine right now is with CreateIcon!

Joel





More information about the wine-devel mailing list