X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/427c415b933075ab9be91d7116c6db80858e0b78..b5fe7ca67bf3121959a0b5a59afd00c1708f2f03:/interface/wx/bitmap.h diff --git a/interface/wx/bitmap.h b/interface/wx/bitmap.h index 68c3ed8bc5..ce3e67080d 100644 --- a/interface/wx/bitmap.h +++ b/interface/wx/bitmap.h @@ -21,7 +21,7 @@ If you wish to extend the capabilities of wxBitmap, derive a class from wxBitmapHandler and add the handler using wxBitmap::AddHandler() in your - application initialisation. + application initialization. Note that all wxBitmapHandlers provided by wxWidgets are part of the @ref page_libs_wxcore library. @@ -29,7 +29,7 @@ wxBitmap class documentation. @library{wxcore} - @category{misc} + @category{gdi} @see @ref overview_bitmap, wxBitmap, wxIcon, wxCursor */ @@ -167,17 +167,21 @@ public: class (either wxNativePixelData for RGB bitmaps or wxAlphaPixelData for bitmaps with an additionaly alpha channel). - @note - Many wxBitmap functions take a @e type parameter, which is a value of the - ::wxBitmapType enumeration. + Note that many wxBitmap functions take a @e type parameter, which is a + value of the ::wxBitmapType enumeration. The validity of those values depends however on the platform where your program is running and from the wxWidgets configuration. - If all possible wxWidgets settings are used, the Windows platform supports BMP file, - BMP resource, XPM data, and XPM. - Under wxGTK, the available formats are BMP file, XPM data, XPM file, and PNG file. - Under wxMotif, the available formats are XBM data, XBM file, XPM data, XPM file. - In addition, wxBitmap can load and save all formats that wxImage; see wxImage for - more info. Of course, you must have wxImage handlers loaded. + If all possible wxWidgets settings are used: + - wxMSW supports BMP and ICO files, BMP and ICO resources; + - wxGTK supports XPM files; + - wxMac supports PICT resources; + - wxX11 supports XPM files, XPM data, XBM data; + + In addition, wxBitmap can load and save all formats that wxImage can; see wxImage + for more info. Of course, you must have loaded the wxImage handlers + (see ::wxInitAllImageHandlers() and wxImage::AddHandler). + Note that all available wxBitmapHandlers for a given wxWidgets port are + automatically loaded at startup so you won't need to use wxBitmap::AddHandler. @library{wxcore} @category{gdi} @@ -336,6 +340,14 @@ public: @param handler A new bitmap format handler object. There is usually only one instance of a given handler class in an application session. + + Note that unlike wxImage::AddHandler, there's no documented list of + the wxBitmapHandlers available in wxWidgets. + This is because they are platform-specific and most important, they are + all automatically loaded at startup. + + If you want to be sure that wxBitmap can load a certain type of image, + you'd better use wxImage::AddHandler. @see wxBitmapHandler */ @@ -436,10 +448,12 @@ public: @see wxBitmapHandler */ - static wxList GetHandlers(); + static wxList& GetHandlers(); /** Gets the height of the bitmap in pixels. + + @see GetWidth(), GetSize() */ virtual int GetHeight() const; @@ -465,10 +479,19 @@ public: */ virtual wxBitmap GetSubBitmap(const wxRect& rect) const; + /** + Returns the size of the bitmap in pixels. + + @since 2.9.0 + + @see GetHeight(), GetWidth() + */ + wxSize GetSize() const; + /** Gets the width of the bitmap in pixels. - @see GetHeight() + @see GetHeight(), GetSize() */ virtual int GetWidth() const;