#include <ATSUnicode.h>
#include <TextCommon.h>
#include <TextEncodingConverter.h>
-#if !USE_SHARED_LIBRARY
+
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
-#endif
//-----------------------------------------------------------------------------
// constants
wxCoord xx = XLOG2DEVMAC(x);
wxCoord yy = YLOG2DEVMAC(y);
+ wxCoord w = icon.GetWidth();
+ wxCoord h = icon.GetHeight();
+ wxCoord ww = XLOG2DEVREL(w);
+ wxCoord hh = YLOG2DEVREL(h);
- Rect r = { yy , xx, yy + 32 , xx + 32 } ;
+ Rect r = { yy , xx, yy + hh , xx + ww } ;
PlotIconRef( &r , kAlignNone , kTransformNone , kPlotIconRefNormalFlags , MAC_WXHICON( icon.GetHICON() ) ) ;
}
void wxDC::DoSetClippingRegionAsRegion( const wxRegion ®ion )
{
wxCHECK_RET( Ok(), wxT("invalid window dc") ) ;
- if (region.Empty())
- {
- DestroyClippingRegion();
- return;
- }
wxMacFastPortSetter helper(this) ;
wxCoord x, y, w, h;
region.GetBox( x, y, w, h );
UniCharCount chars = str.Length() ;
UniChar* ubuf = NULL ;
#if SIZEOF_WCHAR_T == 4
- wxMBConvUTF16BE converter ;
+ wxMBConvUTF16 converter ;
#if wxUSE_UNICODE
size_t unicharlen = converter.WC2MB( NULL , str.wc_str() , 0 ) ;
ubuf = (UniChar*) malloc( unicharlen + 2 ) ;
&chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
wxASSERT_MSG( status == noErr , wxT("couldn't create the layout of the rotated text") );
+
+ status = ::ATSUSetTransientFontMatching( atsuLayout , true ) ;
+ wxASSERT_MSG( status == noErr , wxT("couldn't setup transient font matching") );
+
int iAngle = int( angle );
int drawX = XLOG2DEVMAC(x) ;
int drawY = YLOG2DEVMAC(y) ;