git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73574
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// creates an bitmap from the native image format
wxBitmap(CGImageRef image);
// creates an bitmap from the native image format
wxBitmap(CGImageRef image);
+ wxBitmap(WX_NSImage image);
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); }
// If depth is omitted, will create a bitmap compatible with the display
wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); }
virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1);
bool Create( CGImageRef image );
virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1);
bool Create( CGImageRef image );
+ bool Create( WX_NSImage image );
// virtual bool Create( WXHICON icon) ;
virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
// virtual bool Create( WXHICON icon) ;
virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE);
+wxBitmap::wxBitmap(WX_NSImage image)
+{
+ (void)Create(image);
+}
+
+bool wxBitmap::Create(WX_NSImage image)
+{
+ wxCFRef<CGImageRef> cgimage(wxOSXCreateCGImageFromNSImage(image));
+ return Create(cgimage);
+}
+
WX_NSImage wxBitmap::GetNSImage() const
{
wxCFRef< CGImageRef > cgimage(CreateCGImage());
WX_NSImage wxBitmap::GetNSImage() const
{
wxCFRef< CGImageRef > cgimage(CreateCGImage());