#define mm2pt 2.83464566929
#define pt2mm 0.352777777778
#if !defined( __DARWIN__ ) || defined(__MWERKS__)
+#ifndef M_PI
const double M_PI = 3.14159265358979 ;
#endif
+#endif
const double RAD2DEG = 180.0 / M_PI;
const short kEmulatedMode = -1 ;
const short kUnsupportedMode = -2 ;
&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 ;
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") );
} ;
Boolean kTrue = true ;
Boolean kFalse = false ;
- BslnBaselineClass kBaselineDefault = kBSLNHangingBaseline ;
+ //BslnBaselineClass kBaselineDefault = kBSLNHangingBaseline ;
ATSUVerticalCharacterType kHorizontal = kATSUStronglyHorizontal;
ATSUAttributeValuePtr atsuValues[sizeof(atsuTags)/sizeof(ATSUAttributeTag)] =
{