CTFontRef wxMacCreateCTFont( const wxFont& font )
{
#ifdef __WXMAC__
- return wxCFRetain((CTFontRef) font.MacGetCTFont());
+ return wxCFRetain((CTFontRef) font.OSXGetCTFont());
#else
return CTFontCreateWithName( wxCFStringRef( font.GetFaceName(), wxLocale::GetSystemEncoding() ) , font.GetPointSize() , NULL );
#endif
virtual ATSUStyle GetATSUStyle() { return m_macATSUIStyle; }
#endif
#if wxOSX_USE_CORE_TEXT
- CTFontRef GetCTFont() const { return m_ctFont ; }
+ CTFontRef OSXGetCTFont() const { return m_ctFont ; }
#endif
wxColour GetColour() const { return m_colour ; }
// we need the scale here ...
- Fixed atsuSize = IntToFixed( int( 1 * font.MacGetFontSize()) );
+ Fixed atsuSize = IntToFixed( int( 1 * font.GetPointSize()) );
RGBColor atsuColor ;
col.GetRGBColor( &atsuColor );
ATSUAttributeTag atsuTags[] =
void wxMacCoreGraphicsContext::BeginLayer(wxDouble opacity)
{
CGContextSaveGState(m_cgContext);
- CGContextSetAlpha(m_cgContext, opacity);
+ CGContextSetAlpha(m_cgContext, (CGFloat) opacity);
CGContextBeginTransparencyLayer(m_cgContext, 0);
}
{
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
wxCFStringRef text(str, wxLocale::GetSystemEncoding() );
- CTFontRef font = fref->GetCTFont();
+ CTFontRef font = fref->OSXGetCTFont();
CGColorRef col = wxMacCreateCGColor( fref->GetColour() );
CTUnderlineStyle ustyle = fref->GetUnderlined() ? kCTUnderlineStyleSingle : kCTUnderlineStyleNone ;
wxCFRef<CFNumberRef> underlined( CFNumberCreate(NULL, kCFNumberSInt32Type, &ustyle) );
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 );
if ( UMAGetSystemVersion() >= 0x1050 )
{
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
- CTFontRef font = fref->GetCTFont();
+ CTFontRef font = fref->OSXGetCTFont();
wxCFStringRef text(str, wxLocale::GetSystemEncoding() );
CFStringRef keys[] = { kCTFontAttributeName };
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) ;
#if wxOSX_USE_CORE_TEXT
{
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
- CTFontRef font = fref->GetCTFont();
+ CTFontRef font = fref->OSXGetCTFont();
wxCFStringRef t(text, wxLocale::GetSystemEncoding() );
CFStringRef keys[] = { kCTFontAttributeName };
#if wxOSX_USE_CARBON
return new wxMacCoreGraphicsContext(this,(WindowRef)window);
#else
+ wxUnusedVar(window);
return NULL;
#endif
}