]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/bitmap.h
Fix ribbon bar scroll buttons visibility bug.
[wxWidgets.git] / interface / wx / bitmap.h
index 1b185d7f3c90fe9a0d1d43d869fd1e24e1df6c07..9f6c3ffe41c44c3eb15650b17e2716f9f573b670 100644 (file)
@@ -584,6 +584,31 @@ public:
     */
     virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
 
+    /**
+        Loads a bitmap from the memory containing image data in PNG format.
+
+        This helper function provides the simplest way to create a wxBitmap
+        from PNG image data. On most platforms, it's simply a wrapper around
+        wxImage loading functions and so requires the PNG image handler to be
+        registered by either calling wxInitAllImageHandlers() which also
+        registers all the other image formats or including the necessary
+        header:
+        @code
+            #include <wx/imagpng.h>
+        @endcode
+        and calling
+        @code
+            wxImage::AddHandler(new wxPNGHandler);
+        @endcode
+        in your application startup code.
+
+        However under OS X this function uses native image loading and so
+        doesn't require wxWidgets PNG support.
+
+        @since 2.9.5
+     */
+    static wxBitmap NewFromPNGData(const void* data, size_t size);
+
     /**
         Finds the handler with the given name, and removes it.
         The handler is not deleted.