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:
parent
df57c15cce
commit
880f536912
@ -316,15 +316,16 @@ protected:
|
|||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#if wxMAC_USE_CORE_GRAPHICS
|
||||||
// CoreGraphics
|
// CoreGraphics
|
||||||
wxGraphicContext * m_graphicContext ;
|
wxGraphicContext * m_graphicContext ;
|
||||||
|
wxPoint m_macLocalOriginInPort ;
|
||||||
#else
|
#else
|
||||||
mutable bool m_macFontInstalled ;
|
mutable bool m_macFontInstalled ;
|
||||||
mutable bool m_macPenInstalled ;
|
mutable bool m_macPenInstalled ;
|
||||||
mutable bool m_macBrushInstalled ;
|
mutable bool m_macBrushInstalled ;
|
||||||
|
|
||||||
WXHRGN m_macBoundaryClipRgn ;
|
WXHRGN m_macBoundaryClipRgn ;
|
||||||
WXHRGN m_macCurrentClipRgn ;
|
WXHRGN m_macCurrentClipRgn ;
|
||||||
void MacSetupPort( wxMacPortStateHelper* ph ) const ;
|
void MacSetupPort( wxMacPortStateHelper* ph ) const ;
|
||||||
void MacCleanupPort( wxMacPortStateHelper* ph ) const ;
|
void MacCleanupPort( wxMacPortStateHelper* ph ) const ;
|
||||||
mutable wxMacPortStateHelper* m_macCurrentPortStateHelper ;
|
mutable wxMacPortStateHelper* m_macCurrentPortStateHelper ;
|
||||||
mutable bool m_macFormerAliasState ;
|
mutable bool m_macFormerAliasState ;
|
||||||
mutable short m_macFormerAliasSize ;
|
mutable short m_macFormerAliasSize ;
|
||||||
|
@ -906,8 +906,17 @@ bool wxDC::DoFloodFill(wxCoord x, wxCoord y,
|
|||||||
bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const
|
bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), false, wxT("wxDC::DoGetPixel Invalid DC") );
|
wxCHECK_MSG( Ok(), false, wxT("wxDC::DoGetPixel Invalid DC") );
|
||||||
wxFAIL_MSG( wxT("GetPixel not implemented on Core Graphics") ) ;
|
wxCHECK_MSG( Ok(), false, wxT("wxDC::DoGetPixel Invalid DC") );
|
||||||
return false ;
|
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 )
|
void wxDC::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 )
|
||||||
|
Loading…
Reference in New Issue
Block a user