wxCoord ww = XLOG2DEVREL(w);
wxCoord hh = YLOG2DEVREL(h);
- CGContextRef cg = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef cg = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
CGImageRef image = (CGImageRef)( bmp.CGImageCreate() ) ;
HIRect r = CGRectMake( xx , yy , ww , hh ) ;
HIViewDrawCGImage( cg , &r , image ) ;
wxCoord ww = XLOG2DEVREL(w);
wxCoord hh = YLOG2DEVREL(h);
- CGContextRef cg = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef cg = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
CGRect r = CGRectMake( 00 , 00 , ww , hh ) ;
CGContextSaveGState(cg);
CGContextTranslateCTM(cg, xx , yy + hh );
ww = XLOG2DEVREL(width);
hh = YLOG2DEVREL(height);
- CGContextRef cgContext = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef cgContext = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
CGRect clipRect = CGRectMake( xx ,yy , ww, hh ) ;
CGContextClipToRect( cgContext , clipRect ) ;
void wxDC::DestroyClippingRegion()
{
// CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ;
- CGContextRef cgContext = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef cgContext = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
CGContextRestoreGState( cgContext );
CGContextSaveGState( cgContext );
SetPen( m_pen ) ;
}
if ( blit.Ok() )
{
- CGContextRef cg = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef cg = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
CGImageRef image = (CGImageRef)( blit.CGImageCreate() ) ;
HIRect r = CGRectMake( xxdest , yydest , wwdest , hhdest ) ;
HIViewDrawCGImage( cg , &r , image ) ;
else
{
/*
- CGContextRef cg = dynamic_cast<wxMacCGContext*>(source->GetGraphicContext())->GetNativeContext() ;
+ CGContextRef cg = (wxMacCGContext*)(source->GetGraphicContext())->GetNativeContext() ;
void *data = CGBitmapContextGetData( cg ) ;
*/
return FALSE ; // wxFAIL_MSG( wxT("Blitting is only supported from bitmap contexts") ) ;
atsuTags, atsuSizes, atsuValues ) ;
}
{
- CGContextRef cgContext = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef cgContext = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
ATSUAttributeTag atsuTags[] =
{
kATSUCGContextTag ,
IntToFixed(drawX) , IntToFixed(drawY) , &rect );
wxASSERT_MSG( status == noErr , wxT("couldn't measure the rotated text") );
- CGContextSaveGState(dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext());
- CGContextTranslateCTM(dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext(), drawX, drawY);
- CGContextScaleCTM(dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext(), 1, -1);
+ CGContextSaveGState((wxMacCGContext*)(m_graphicContext)->GetNativeContext());
+ CGContextTranslateCTM((wxMacCGContext*)(m_graphicContext)->GetNativeContext(), drawX, drawY);
+ CGContextScaleCTM((wxMacCGContext*)(m_graphicContext)->GetNativeContext(), 1, -1);
status = ::ATSUDrawText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
IntToFixed(0) , IntToFixed(0) );
wxASSERT_MSG( status == noErr , wxT("couldn't draw the rotated text") );
- CGContextRestoreGState( dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ) ;
+ CGContextRestoreGState( (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ) ;
CalcBoundingBox(XDEV2LOG(rect.left), YDEV2LOG(rect.top) );
CalcBoundingBox(XDEV2LOG(rect.right), YDEV2LOG(rect.bottom) );
if ( m_backgroundBrush.Ok() && m_backgroundBrush.GetStyle() != wxTRANSPARENT)
{
HIRect rect = CGRectMake( -10000 , -10000 , 20000 , 20000 ) ;
- CGContextRef cg = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef cg = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
switch( m_backgroundBrush.MacGetBrushKind() )
{
case kwxMacBrushTheme :
/*
if ( m_window->MacGetCGContextRef() == 0)
{
- CGContextRef cgContext = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef cgContext = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
CGContextFlush( cgContext ) ;
}
*/
{
#if wxMAC_USE_CORE_GRAPHICS
m_selected.EndRawAccess() ;
- CGContextRef bmCtx = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef bmCtx = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
delete m_graphicContext ;
m_graphicContext = NULL ;
CGContextRelease( bmCtx ) ;
{
#if wxMAC_USE_CORE_GRAPHICS
m_selected.EndRawAccess() ;
- CGContextRef bmCtx = dynamic_cast<wxMacCGContext*>(m_graphicContext)->GetNativeContext() ;
+ CGContextRef bmCtx = (wxMacCGContext*)(m_graphicContext)->GetNativeContext() ;
delete m_graphicContext ;
m_graphicContext = NULL ;
CGContextRelease( bmCtx ) ;
#if wxMAC_USE_CORE_GRAPHICS
void wxPrinterDC::MacSetCGContext( void * cg )
{
- dynamic_cast<wxMacCGContext*>(m_graphicContext)->SetNativeContext( (CGContextRef) cg ) ;
+ (wxMacCGContext*)(m_graphicContext)->SetNativeContext( (CGContextRef) cg ) ;
m_graphicContext->SetPen( m_pen ) ;
m_graphicContext->SetBrush( m_brush ) ;
}
{
#if wxMAC_USE_CORE_GRAPHICS
QDPictRef cgPictRef = M_METAFILEDATA->m_qdPictRef ;
- CGContextRef cg = dynamic_cast<wxMacCGContext*>(dc->GetGraphicContext())->GetNativeContext() ;
+ CGContextRef cg = (wxMacCGContext*)(dc->GetGraphicContext())->GetNativeContext() ;
CGRect bounds = QDPictGetBounds( cgPictRef ) ;
CGContextSaveGState(cg);
{
CGContextRef cgContext ;
#if wxMAC_USE_CORE_GRAPHICS
- cgContext = dynamic_cast<wxMacCGContext*>(dc.GetGraphicContext())->GetNativeContext() ;
+ cgContext = (wxMacCGContext*)(dc.GetGraphicContext())->GetNativeContext() ;
#else
Rect bounds ;
GetPortBounds( (CGrafPtr) dc.m_macPort , &bounds ) ;
{
CGContextRef cgContext ;
#if wxMAC_USE_CORE_GRAPHICS
- cgContext = dynamic_cast<wxMacCGContext*>(dc.GetGraphicContext())->GetNativeContext() ;
+ cgContext = (wxMacCGContext*)(dc.GetGraphicContext())->GetNativeContext() ;
#else
Rect bounds ;
GetPortBounds( (CGrafPtr) dc.m_macPort , &bounds ) ;
static pascal void wxMacControlUserPaneDrawProc(ControlRef control, SInt16 part)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
- wxMacMLTEClassicControl * win = textCtrl ? dynamic_cast<wxMacMLTEClassicControl*>(textCtrl->GetPeer()) : NULL ;
+ wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
win->MacControlUserPaneDrawProc(part) ;
}
static pascal ControlPartCode wxMacControlUserPaneHitTestProc(ControlRef control, Point where)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
- wxMacMLTEClassicControl * win = textCtrl ? dynamic_cast<wxMacMLTEClassicControl*>(textCtrl->GetPeer()) : NULL ;
+ wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
return win->MacControlUserPaneHitTestProc(where.h , where.v) ;
else
static pascal ControlPartCode wxMacControlUserPaneTrackingProc(ControlRef control, Point startPt, ControlActionUPP actionProc)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
- wxMacMLTEClassicControl * win = textCtrl ? dynamic_cast<wxMacMLTEClassicControl*>(textCtrl->GetPeer()) : NULL ;
+ wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
return win->MacControlUserPaneTrackingProc( startPt.h , startPt.v , (void*) actionProc) ;
else
static pascal void wxMacControlUserPaneIdleProc(ControlRef control)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
- wxMacMLTEClassicControl * win = textCtrl ? dynamic_cast<wxMacMLTEClassicControl*>(textCtrl->GetPeer()) : NULL ;
+ wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
win->MacControlUserPaneIdleProc() ;
}
static pascal ControlPartCode wxMacControlUserPaneKeyDownProc(ControlRef control, SInt16 keyCode, SInt16 charCode, SInt16 modifiers)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
- wxMacMLTEClassicControl * win = textCtrl ? dynamic_cast<wxMacMLTEClassicControl*>(textCtrl->GetPeer()) : NULL ;
+ wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
return win->MacControlUserPaneKeyDownProc(keyCode,charCode,modifiers) ;
else
static pascal void wxMacControlUserPaneActivateProc(ControlRef control, Boolean activating)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
- wxMacMLTEClassicControl * win = textCtrl ? dynamic_cast<wxMacMLTEClassicControl*>(textCtrl->GetPeer()) : NULL ;
+ wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
win->MacControlUserPaneActivateProc(activating) ;
}
static pascal ControlPartCode wxMacControlUserPaneFocusProc(ControlRef control, ControlFocusPart action)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
- wxMacMLTEClassicControl * win = textCtrl ? dynamic_cast<wxMacMLTEClassicControl*>(textCtrl->GetPeer()) : NULL ;
+ wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
return win->MacControlUserPaneFocusProc(action) ;
else
static pascal void wxMacControlUserPaneBackgroundProc(ControlRef control, ControlBackgroundPtr info)
{
wxTextCtrl *textCtrl = wxDynamicCast( wxFindControlFromMacControl(control) , wxTextCtrl ) ;
- wxMacMLTEClassicControl * win = textCtrl ? dynamic_cast<wxMacMLTEClassicControl*>(textCtrl->GetPeer()) : NULL ;
+ wxMacMLTEClassicControl * win = textCtrl ? (wxMacMLTEClassicControl*)(textCtrl->GetPeer()) : NULL ;
if ( win )
win->MacControlUserPaneBackgroundProc(info) ;
}