From Audacity Wiki
Revision as of 12:06, 13 December 2009 by James (talk | contribs) (New page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page is for requests for enhancements to wxWidgets. These may indicates issues we have 'worked around' which we'd like a cleaner solution to.


To be confirmed

Changes to locale (under Linux) only take effect after a reboot in wxWidgets, whilst in other apps the effect can be immediate.

Transparency, Masks, Alpha, wxImages and wxBitmaps

Possibly improved/fixed in latest wxWidgets:

At the time of writing, wxWidgets support for alpha-channel based transparency is patchy.

  • Support for masks, that is all or nothing transparency, is excellent.
  • Support for alpha channel transparency, that is where values between 0 and 255 let some but not all of the background show through, is incomplete. It seems to be best supported on Windows, and least well supported on Mac.

Mask based transparency leads to sharp edges that look blocky and 'dated' on modern PC's - so we try to use alpha blending when we need transparency .

Support for alpha blending in wxImage and wxBitmap is different.

  • wxImage is a platform neutral image. There are nice functions for loading and saving PNGs with transparency to or from a wxImage. These work on all platforms we use.
  • wxBitmap is a platform specific 'image'. To display an image it must at some point be converted to a wxBitmap.

Now, a 32 bit wxBitmap has 24 bits for RGB and 8 bits for alpha. Under WindowsXP you can paste wxBitmaps into a wxMemDc and preserve the alpha channel. However, when you convert to a wxImage, unless you use an undocumented function which only works on WindowsXP, you lose it. To output a wxBitmap to a file you have to convert to a wxImage.

The workarounds for the incomplete alpha-channel support can be found in ImageManipulation.cpp . Also, in implementing Themability we keep both wxImages and wxBitmaps to work around the conversion problems.


Fixed in current wxWidgets:

We know a wxTreeBook is coming in wxWidgets 2.7.0. We're using a contrib-version that works pretty well, but using it as if it were a wxListBook. We've tried using wxWidgets 2.6.3 undocumented versions of wxChoiceBook and wxListBook, and in 2.6.3, neither is ready for prime time.

We're looking forward to having a built in wxTreeBook.