moving common code up
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
536bfe3d76
commit
71c5a4d19d
@ -30,12 +30,13 @@ IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl)
|
||||
wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) :
|
||||
wxWindowDCImpl( owner )
|
||||
{
|
||||
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||
SetGraphicsContext( wxGraphicsContext::Create() );
|
||||
m_ok = true ;
|
||||
#else
|
||||
CGRect cgbounds ;
|
||||
cgbounds = CGDisplayBounds(CGMainDisplayID());
|
||||
m_width = (wxCoord)cgbounds.size.width;
|
||||
m_height = (wxCoord)cgbounds.size.height;
|
||||
#if wxOSX_USE_COCOA_OR_IPHONE
|
||||
SetGraphicsContext( wxGraphicsContext::Create() );
|
||||
#else
|
||||
Rect bounds;
|
||||
bounds.top = (short)cgbounds.origin.y;
|
||||
bounds.left = (short)cgbounds.origin.x;
|
||||
@ -45,10 +46,8 @@ wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) :
|
||||
CreateNewWindow( kOverlayWindowClass, overlayAttributes, &bounds, (WindowRef*) &m_overlayWindow );
|
||||
ShowWindow((WindowRef)m_overlayWindow);
|
||||
SetGraphicsContext( wxGraphicsContext::CreateFromNativeWindow( m_overlayWindow ) );
|
||||
m_width = (wxCoord)cgbounds.size.width;
|
||||
m_height = (wxCoord)cgbounds.size.height;
|
||||
m_ok = true ;
|
||||
#endif
|
||||
m_ok = true ;
|
||||
}
|
||||
|
||||
wxScreenDCImpl::~wxScreenDCImpl()
|
||||
|
Loading…
Reference in New Issue
Block a user