Add wxBitmap(NSImage*) ctor to wxOSX.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1005,6 +1005,17 @@ IconRef wxBitmap::CreateIconRef() const
|
||||
|
||||
#if wxOSX_USE_COCOA
|
||||
|
||||
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());
|
||||
|
||||
Reference in New Issue
Block a user