X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/12f5e1e78fe906050ff2fee9529476db332633f0..5fa507c8cadd72e5b9765167897baf00f48ac7ea:/interface/wx/bitmap.h?ds=inline diff --git a/interface/wx/bitmap.h b/interface/wx/bitmap.h index f419d074be..3d1ec2000e 100644 --- a/interface/wx/bitmap.h +++ b/interface/wx/bitmap.h @@ -23,6 +23,11 @@ wxBitmapHandler and add the handler using wxBitmap::AddHandler() in your application initialisation. + Note that all wxBitmapHandlers provided by wxWidgets are part of the + @ref page_libs_wxcore library. + For details about the default handlers, please see the note in the + wxBitmap class documentation. + @library{wxcore} @category{misc} @@ -156,7 +161,7 @@ public: This class encapsulates the concept of a platform-dependent bitmap, either monochrome or colour or colour with alpha channel support. - + If you need direct access the bitmap data instead going through drawing to it using wxMemoryDC you need to use the wxPixelData class (either wxNativePixelData for RGB bitmaps or wxAlphaPixelData @@ -279,10 +284,13 @@ public: @param type May be one of the ::wxBitmapType values and indicates which type of bitmap should be loaded. See the note in the class detailed description. + Note that the wxBITMAP_DEFAULT_TYPE constant has different value under + different wxWidgets ports. See the bitmap.h header for the value it takes + for a specific port. @see LoadFile() */ - wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_TYPE_XPM); + wxBitmap(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); /** Creates this bitmap object from the given image. @@ -432,6 +440,8 @@ public: /** Gets the height of the bitmap in pixels. + + @see GetWidth(), GetSize() */ virtual int GetHeight() const; @@ -457,10 +467,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; @@ -489,7 +508,7 @@ public: /** Returns @true if bitmap data is present. */ - bool IsOk() const; + virtual bool IsOk() const; /** Loads a bitmap from a file or resource. @@ -500,6 +519,9 @@ public: @param type One of the ::wxBitmapType values; see the note in the class detailed description. + Note that the wxBITMAP_DEFAULT_TYPE constant has different value under + different wxWidgets ports. See the bitmap.h header for the value it takes + for a specific port. @return @true if the operation succeeded, @false otherwise. @@ -510,7 +532,7 @@ public: @see SaveFile() */ - virtual bool LoadFile(const wxString& name, wxBitmapType type); + virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); /** Finds the handler with the given name, and removes it.