X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31fb3cfe02f5ed82c47b80d264e84b8207a456b4..36a0190ebd5bd9a7302f60f6dcd608b80574e21c:/interface/wx/image.h diff --git a/interface/wx/image.h b/interface/wx/image.h index 8f19e19969..9ae1bb0a06 100644 --- a/interface/wx/image.h +++ b/interface/wx/image.h @@ -2,7 +2,6 @@ // Name: image.h // Purpose: interface of wxImageHandler and wxImage // Author: wxWidgets team -// RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -335,6 +334,24 @@ public: @since 2.9.2 */ static wxVersionInfo GetLibraryVersionInfo(); + +protected: + /** + Called to get the number of images available in a multi-image file + type, if supported. + + NOTE: this function is allowed to change the current stream position + since GetImageCount() will take care of restoring it later + */ + virtual int DoGetImageCount( wxInputStream& stream ); + + /** + Called to test if this handler can read an image from the given stream. + + NOTE: this function is allowed to change the current stream position + since CallDoCanRead() will take care of restoring it later + */ + virtual bool DoCanRead( wxInputStream& stream ) = 0; }; @@ -350,6 +367,9 @@ const unsigned char wxIMAGE_ALPHA_TRANSPARENT = 0; */ const unsigned char wxIMAGE_ALPHA_OPAQUE = 0xff; +const unsigned char wxIMAGE_ALPHA_THRESHOLD = 0x80; + + /** @class wxImage @@ -1074,7 +1094,7 @@ public: This is most often used when doing direct image manipulation. The return value points to an array of characters in RGBRGBRGB... format in the top-to-bottom, left-to-right order, that is the first RGB triplet - corresponds to the pixel first pixel of the first row, the second one --- + corresponds to the first pixel of the first row, the second one --- to the second pixel of the first row and so on until the end of the first row, with second row following after it and so on. @@ -1335,7 +1355,7 @@ public: bool IsOk() const; /** - Returns @true if the given pixel is transparent, i.e. either has the mask + Returns @true if the given pixel is transparent, i.e.\ either has the mask colour if this image has a mask or if this image has alpha channel and alpha value of this pixel is strictly less than @a threshold. */