fixing warning in osx core and carbon

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2009-03-23 15:24:04 +00:00
parent 0faf03bf97
commit de0d209531
10 changed files with 26 additions and 10 deletions

View File

@@ -1806,7 +1806,7 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op)
void wxMacCoreGraphicsContext::BeginLayer(wxDouble opacity)
{
CGContextSaveGState(m_cgContext);
CGContextSetAlpha(m_cgContext, opacity);
CGContextSetAlpha(m_cgContext, (CGFloat) opacity);
CGContextBeginTransparencyLayer(m_cgContext, 0);
}
@@ -2179,7 +2179,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
y += CTFontGetAscent(font);
CGContextSaveGState(m_cgContext);
CGContextTranslateCTM(m_cgContext, x, y);
CGContextTranslateCTM(m_cgContext, (CGFloat) x, (CGFloat) y);
CGContextScaleCTM(m_cgContext, 1, -1);
CGContextSetTextPosition(m_cgContext, 0, 0);
CTLineDraw( line, m_cgContext );
@@ -2352,7 +2352,8 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
wxCFRef<CFAttributedStringRef> attrtext( CFAttributedStringCreate(kCFAllocatorDefault, text, attributes) );
wxCFRef<CTLineRef> line( CTLineCreateWithAttributedString(attrtext) );
CGFloat w, a, d, l;
double w;
CGFloat a, d, l;
w = CTLineGetTypographicBounds(line, &a, &d, &l) ;
@@ -2703,6 +2704,7 @@ wxGraphicsContext * wxMacCoreGraphicsRenderer::CreateContextFromNativeWindow( vo
#if wxOSX_USE_CARBON
return new wxMacCoreGraphicsContext(this,(WindowRef)window);
#else
wxUnusedVar(window);
return NULL;
#endif
}