reintroducing direct access, cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2005-02-18 16:47:07 +00:00
parent df57c15cce
commit 880f536912
2 changed files with 19 additions and 9 deletions

View File

@ -316,15 +316,16 @@ protected:
#if wxMAC_USE_CORE_GRAPHICS
// CoreGraphics
wxGraphicContext * m_graphicContext ;
wxPoint m_macLocalOriginInPort ;
#else
mutable bool m_macFontInstalled ;
mutable bool m_macPenInstalled ;
mutable bool m_macBrushInstalled ;
mutable bool m_macFontInstalled ;
mutable bool m_macPenInstalled ;
mutable bool m_macBrushInstalled ;
WXHRGN m_macBoundaryClipRgn ;
WXHRGN m_macCurrentClipRgn ;
void MacSetupPort( wxMacPortStateHelper* ph ) const ;
void MacCleanupPort( wxMacPortStateHelper* ph ) const ;
WXHRGN m_macBoundaryClipRgn ;
WXHRGN m_macCurrentClipRgn ;
void MacSetupPort( wxMacPortStateHelper* ph ) const ;
void MacCleanupPort( wxMacPortStateHelper* ph ) const ;
mutable wxMacPortStateHelper* m_macCurrentPortStateHelper ;
mutable bool m_macFormerAliasState ;
mutable short m_macFormerAliasSize ;

View File

@ -906,8 +906,17 @@ bool wxDC::DoFloodFill(wxCoord x, wxCoord y,
bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const
{
wxCHECK_MSG( Ok(), false, wxT("wxDC::DoGetPixel Invalid DC") );
wxFAIL_MSG( wxT("GetPixel not implemented on Core Graphics") ) ;
return false ;
wxCHECK_MSG( Ok(), false, wxT("wxDC::DoGetPixel Invalid DC") );
wxMacPortSaver helper((CGrafPtr)m_macPort) ;
RGBColor colour;
GetCPixel(
XLOG2DEVMAC(x) + m_macLocalOriginInPort.x - m_macLocalOrigin.x,
YLOG2DEVMAC(y) + m_macLocalOriginInPort.y - m_macLocalOrigin.y, &colour );
// Convert from Mac colour to wx
col->Set( colour.red >> 8,
colour.green >> 8,
colour.blue >> 8);
return true ;
}
void wxDC::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 )