X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d39292566bf462869f38c9f03399f0ff04630a32..07890fbeb5e65f242e8632ed957c54e188779af2:/src/osx/iphone/utils.mm diff --git a/src/osx/iphone/utils.mm b/src/osx/iphone/utils.mm index 8c780ac93d..565f345f3d 100644 --- a/src/osx/iphone/utils.mm +++ b/src/osx/iphone/utils.mm @@ -145,7 +145,7 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height) *width = r.size.width; if ( height ) *height = r.size.height; - + } void wxGetMousePosition( int* x, int* y ) @@ -163,7 +163,7 @@ int wxDisplayDepth() void wxDisplaySize(int *width, int *height) { CGRect bounds = [[UIScreen mainScreen] bounds]; - + if ( width ) *width = (int)bounds.size.width ; if ( height ) @@ -224,21 +224,21 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const // call this method when a Blit is performed with it as a source. if (!m_window) return wxNullBitmap; - + wxSize sz = m_window->GetSize(); - + int left = subrect != NULL ? subrect->x : 0 ; int top = subrect != NULL ? subrect->y : 0 ; int width = subrect != NULL ? subrect->width : sz.x; int height = subrect != NULL ? subrect->height : sz.y ; - + wxBitmap bmp = wxBitmap(width, height, 32); - + CGContextRef context = (CGContextRef)bmp.GetHBITMAP(); - + CGContextSaveGState(context); - - + + CGContextTranslateCTM( context, 0, height ); CGContextScaleCTM( context, 1, -1 );