switching to 10.10+ API
This commit is contained in:
@@ -1180,7 +1180,7 @@ outlineView:(NSOutlineView*)outlineView
|
||||
wxDataViewCustomRenderer * const renderer = obj->customRenderer;
|
||||
|
||||
// if this method is called everything is already setup correctly,
|
||||
CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] CGContext];
|
||||
CGContextSaveGState( context );
|
||||
|
||||
if ( ![controlView isFlipped] )
|
||||
|
@@ -112,7 +112,7 @@ void wxOverlayImpl::Init( wxDC* dc, int x , int y , int width , int height )
|
||||
|
||||
CreateOverlayWindow(dc);
|
||||
wxASSERT_MSG(m_overlayWindow != NULL, _("Couldn't create the overlay window"));
|
||||
m_overlayContext = (CGContextRef) [[m_overlayWindow graphicsContext] graphicsPort];
|
||||
m_overlayContext = [[m_overlayWindow graphicsContext] CGContext];
|
||||
wxASSERT_MSG( m_overlayContext != NULL , _("Couldn't init the context on the overlay window") );
|
||||
[(id)m_overlayContext retain];
|
||||
}
|
||||
|
@@ -1255,7 +1255,7 @@ void wxOSX_drawRect(NSView* self, SEL _cmd, NSRect rect)
|
||||
if ( win->UseBgCol() )
|
||||
{
|
||||
|
||||
CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] CGContext];
|
||||
CGContextSaveGState( context );
|
||||
|
||||
CGContextSetFillColorWithColor( context, win->GetBackgroundColour().GetCGColor());
|
||||
@@ -2298,7 +2298,7 @@ void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *WXUNUSED(_cmd))
|
||||
|
||||
// setting up the drawing context
|
||||
// note that starting from 10.14 this may be NULL in certain views
|
||||
CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
|
||||
CGContextRef context = [[NSGraphicsContext currentContext] CGContext];
|
||||
wxpeer->MacSetCGContextRef( context );
|
||||
if ( context != NULL )
|
||||
{
|
||||
|
Reference in New Issue
Block a user