X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..35f6f7de48d3d3a4b13107afaea178c945766bcc:/interface/wx/image.h diff --git a/interface/wx/image.h b/interface/wx/image.h index ef66408ff0..1c1b2d3088 100644 --- a/interface/wx/image.h +++ b/interface/wx/image.h @@ -8,7 +8,6 @@ /** @class wxImageHandler - @wxheader{image.h} This is the base class for implementing image file loading/saving, and image creation from data. @@ -143,7 +142,6 @@ public: /** @class wxImage - @wxheader{image.h} This class encapsulates a platform-independent image. An image can be created from data, or using wxBitmap::ConvertToImage. An image can be @@ -177,15 +175,16 @@ public: wxImage(); /** - Creates an image with the given size and clears it if requested. - Does not create an alpha channel. + Creates an image with the given size and clears it if requested. + + Does not create an alpha channel. @param width Specifies the width of the image. @param height Specifies the height of the image. - @clear - Clear the image with zeros. + @param clear + If @true, initialize the image to black. */ wxImage(int width, int height, bool clear = true); @@ -406,14 +405,17 @@ public: wxImage Copy() const; /** - Creates a fresh image. If @a clear is @true, the new image will be initialized - to black. + Creates a fresh image. + + If @a clear is @true, the new image will be initialized to black. Otherwise, the image data will be uninitialized. @param width The width of the image in pixels. @param height The height of the image in pixels. + @param clear + If @true, initialize the image data with zeros. @return @true if the call succeeded, @false otherwise. */ @@ -1025,6 +1027,25 @@ public: unsigned char green, unsigned char blue); + /** + Set the type of image returned by GetType(). + + This method is mostly used internally by the library but can also be + called from the user code if the image was created from data in the + given bitmap format without using LoadFile() (which would set the type + correctly automatically). + + Notice that the image must be created before this function is called. + + @since 2.9.0 + + @param type + One of bitmap type constants, @c wxBITMAP_TYPE_INVALID is a valid + value for it and can be used to reset the bitmap type to default + but @c wxBITMAP_TYPE_MAX is not allowed here. + */ + void SetType(wxBitmapType type); + /** Returns a resized version of this image without scaling it by adding either a border