Added support for alpha channels in interpolated

and non-interpolated image rotation.
  Added helper method for turning shades of grey
    into shades of alpha and a colour.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30604 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2004-11-18 14:01:45 +00:00
parent 415a0ff16d
commit 6408deedee
2 changed files with 115 additions and 6 deletions

View File

@@ -211,6 +211,18 @@ public:
// otherwise:
bool ConvertAlphaToMask(unsigned char threshold = 128);
// This method converts an image where the original alpha
// information is only available as a shades of a colour
// (actually shades of grey) typically when you draw anti-
// aliased text into a bitmap. The DC drawinf routines
// draw grey values on the black background although they
// actually mean to draw white with differnt alpha values.
// This method reverses it, assuming a black (!) background
// and white text (actually only the red channel is read).
// The method will then fill up the whole image with the
// colour given.
bool ConvertColourToAlpha( unsigned char r, unsigned char g, unsigned char b );
static bool CanRead( const wxString& name );
static int GetImageCount( const wxString& name, long type = wxBITMAP_TYPE_ANY );
virtual bool LoadFile( const wxString& name, long type = wxBITMAP_TYPE_ANY, int index = -1 );