name change to correctly reflect the autorelease nature of the methods, removing double release, fixes #11547, fixes #11760
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -51,7 +51,7 @@ OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage(
|
|||||||
CGContextRef inContext,
|
CGContextRef inContext,
|
||||||
const CGRect * inBounds,
|
const CGRect * inBounds,
|
||||||
CGImageRef inImage) ;
|
CGImageRef inImage) ;
|
||||||
WX_NSImage WXDLLIMPEXP_CORE wxOSXCreateNSImageFromCGImage( CGImageRef image );
|
WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromCGImage( CGImageRef image );
|
||||||
CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage );
|
CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@ OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage(
|
|||||||
const CGRect * inBounds,
|
const CGRect * inBounds,
|
||||||
CGImageRef inImage) ;
|
CGImageRef inImage) ;
|
||||||
|
|
||||||
WX_UIImage WXDLLIMPEXP_CORE wxOSXCreateUIImageFromCGImage( CGImageRef image );
|
WX_UIImage WXDLLIMPEXP_CORE wxOSXGetUIImageFromCGImage( CGImageRef image );
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxWidgetIPhoneImpl : public wxWidgetImpl
|
class WXDLLIMPEXP_CORE wxWidgetIPhoneImpl : public wxWidgetImpl
|
||||||
{
|
{
|
||||||
|
@@ -283,7 +283,7 @@ WX_UIFont wxFont::OSXCreateUIFont(const wxNativeFontInfo* info)
|
|||||||
|
|
||||||
#if wxOSX_USE_IPHONE
|
#if wxOSX_USE_IPHONE
|
||||||
|
|
||||||
WX_UIImage wxOSXCreateUIImageFromCGImage( CGImageRef image )
|
WX_UIImage wxOSXGetUIImageFromCGImage( CGImageRef image )
|
||||||
{
|
{
|
||||||
UIImage *newImage = [UIImage imageWithCGImage:image];
|
UIImage *newImage = [UIImage imageWithCGImage:image];
|
||||||
[newImage autorelease];
|
[newImage autorelease];
|
||||||
@@ -295,7 +295,7 @@ WX_UIImage wxOSXCreateUIImageFromCGImage( CGImageRef image )
|
|||||||
#if wxOSX_USE_COCOA
|
#if wxOSX_USE_COCOA
|
||||||
|
|
||||||
// From "Cocoa Drawing Guide:Working with Images"
|
// From "Cocoa Drawing Guide:Working with Images"
|
||||||
WX_NSImage wxOSXCreateNSImageFromCGImage( CGImageRef image )
|
WX_NSImage wxOSXGetNSImageFromCGImage( CGImageRef image )
|
||||||
{
|
{
|
||||||
NSRect imageRect = NSMakeRect(0.0, 0.0, 0.0, 0.0);
|
NSRect imageRect = NSMakeRect(0.0, 0.0, 0.0, 0.0);
|
||||||
|
|
||||||
@@ -543,11 +543,9 @@ WX_NSCursor wxMacCocoaCreateCursorFromCGImage( CGImageRef cgImageRef, float hot
|
|||||||
firstTime = NO;
|
firstTime = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSImage *nsImage = wxOSXCreateNSImageFromCGImage( cgImageRef );
|
NSImage *nsImage = wxOSXGetNSImageFromCGImage( cgImageRef );
|
||||||
NSCursor *cursor = [[NSCursor alloc] initWithImage:nsImage hotSpot:NSMakePoint( hotSpotX, hotSpotY )];
|
NSCursor *cursor = [[NSCursor alloc] initWithImage:nsImage hotSpot:NSMakePoint( hotSpotX, hotSpotY )];
|
||||||
|
|
||||||
[nsImage release];
|
|
||||||
|
|
||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1028,7 +1028,7 @@ IconRef wxBitmap::CreateIconRef() const
|
|||||||
WX_NSImage wxBitmap::GetNSImage() const
|
WX_NSImage wxBitmap::GetNSImage() const
|
||||||
{
|
{
|
||||||
wxCFRef< CGImageRef > cgimage(CreateCGImage());
|
wxCFRef< CGImageRef > cgimage(CreateCGImage());
|
||||||
return wxOSXCreateNSImageFromCGImage( cgimage );
|
return wxOSXGetNSImageFromCGImage( cgimage );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1038,7 +1038,7 @@ WX_NSImage wxBitmap::GetNSImage() const
|
|||||||
WX_UIImage wxBitmap::GetUIImage() const
|
WX_UIImage wxBitmap::GetUIImage() const
|
||||||
{
|
{
|
||||||
wxCFRef< CGImageRef > cgimage(CreateCGImage());
|
wxCFRef< CGImageRef > cgimage(CreateCGImage());
|
||||||
return wxOSXCreateUIImageFromCGImage( cgimage );
|
return wxOSXGetUIImageFromCGImage( cgimage );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user