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:
@@ -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 );
|
||||
|
Reference in New Issue
Block a user