X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c69e74885f9b33fa1b3f11437b8aabf66ea1f188..da0766ab2ae2357cd4dc111415731ee85aa45984:/src/mac/carbon/dc.cpp diff --git a/src/mac/carbon/dc.cpp b/src/mac/carbon/dc.cpp index 9460b87304..593c01c367 100644 --- a/src/mac/carbon/dc.cpp +++ b/src/mac/carbon/dc.cpp @@ -1321,8 +1321,11 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y, &chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ; #else TECObjectRef ec; - status = TECCreateConverter(&ec, - wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman, kTextEncodingUnicodeDefault); + status = TECCreateConverter(&ec, + wxApp::s_macDefaultEncodingIsPC + ? (int)kTextEncodingWindowsLatin1 + : (int)kTextEncodingMacRoman, + kTextEncodingUnicodeDefault); wxASSERT_MSG( status == noErr , wxT("couldn't start converter") ) ; ByteCount byteOutLen ; @@ -1369,8 +1372,8 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y, status = ::ATSUMeasureText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd, &textBefore , &textAfter, &ascent , &descent ); - drawX += sin(angle/RAD2DEG) * FixedToInt(ascent) ; - drawY += cos(angle/RAD2DEG) * FixedToInt(ascent) ; + drawX += (int)(sin(angle/RAD2DEG) * FixedToInt(ascent)); + drawY += (int)(cos(angle/RAD2DEG) * FixedToInt(ascent)); status = ::ATSUDrawText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd, IntToFixed(drawX) , IntToFixed(drawY) ); wxASSERT_MSG( status == noErr , wxT("couldn't draw the rotated text") ); @@ -1808,7 +1811,7 @@ void wxDC::MacInstallFont() const } ; Boolean kTrue = true ; Boolean kFalse = false ; - BslnBaselineClass kBaselineDefault = kBSLNHangingBaseline ; + //BslnBaselineClass kBaselineDefault = kBSLNHangingBaseline ; ATSUVerticalCharacterType kHorizontal = kATSUStronglyHorizontal; ATSUAttributeValuePtr atsuValues[sizeof(atsuTags)/sizeof(ATSUAttributeTag)] = {