X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/055de35012da711c0ebdf83e53d11f221af731fc..f5d7fd083771b7fee5524f0503f17bda8cf07e85:/src/mac/carbon/dccg.cpp diff --git a/src/mac/carbon/dccg.cpp b/src/mac/carbon/dccg.cpp old mode 100755 new mode 100644 index 4cd27e7247..23d903065e --- a/src/mac/carbon/dccg.cpp +++ b/src/mac/carbon/dccg.cpp @@ -2021,8 +2021,22 @@ bool wxDC::DoBlit( wxDC *source, wxCoord xsrc, wxCoord ysrc, int logical_func , bool useMask, wxCoord xsrcMask, wxCoord ysrcMask ) { - wxCHECK_MSG( Ok(), false, wxT("wxDC(cg)::DoBlit - invalid DC") ); - wxCHECK_MSG( source->Ok(), false, wxT("wxDC(cg)::DoBlit - invalid source DC") ); + return DoStretchBlit( xdest, ydest, width, height, + source, xsrc, ysrc, width, height, + logical_func, useMask, + xsrcMask, ysrcMask ); +} + +bool wxDC::DoStretchBlit(wxCoord xdest, wxCoord ydest, + wxCoord dstWidth, wxCoord dstHeight, + wxDC *source, + wxCoord xsrc, wxCoord ysrc, + wxCoord srcWidth, wxCoord srcHeight, + int logical_func = wxCOPY, bool useMask = false, + wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); +{ + wxCHECK_MSG( Ok(), false, wxT("wxDC(cg)::DoStretchBlit - invalid DC") ); + wxCHECK_MSG( source->Ok(), false, wxT("wxDC(cg)::DoStretchBlit - invalid source DC") ); if ( logical_func == wxNO_OP ) return true ; @@ -2035,13 +2049,13 @@ bool wxDC::DoBlit( wxCoord yysrc = source->YLOG2DEVMAC(ysrc) ; wxCoord xxsrc = source->XLOG2DEVMAC(xsrc) ; - wxCoord wwsrc = source->XLOG2DEVREL(width) ; - wxCoord hhsrc = source->YLOG2DEVREL(height) ; + wxCoord wwsrc = source->XLOG2DEVREL(srcWidth) ; + wxCoord hhsrc = source->YLOG2DEVREL(srcHeight) ; wxCoord yydest = YLOG2DEVMAC(ydest) ; wxCoord xxdest = XLOG2DEVMAC(xdest) ; - wxCoord wwdest = XLOG2DEVREL(width) ; - wxCoord hhdest = YLOG2DEVREL(height) ; + wxCoord wwdest = XLOG2DEVREL(dstWidth) ; + wxCoord hhdest = YLOG2DEVREL(dstHeight) ; wxMemoryDC* memdc = dynamic_cast(source) ; if ( memdc && logical_func == wxCOPY ) @@ -2125,7 +2139,7 @@ bool wxDC::CanGetTextExtent() const void wxDC::DoGetTextExtent( const wxString &str, wxCoord *width, wxCoord *height, wxCoord *descent, wxCoord *externalLeading , - wxFont *theFont ) const + const wxFont *theFont ) const { wxCHECK_RET( Ok(), wxT("wxDC(cg)::DoGetTextExtent - invalid DC") ); @@ -2283,45 +2297,45 @@ void wxDC::Clear(void) else return (wxCoord)((double)new_y * m_scaleY - 0.5) * m_signY + m_deviceOriginY + m_macLocalOrigin.y; } -*/ // TODO -wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const + +wxCoord wxDC::DeviceToLogicalX(wxCoord x) const { return wxRound((double)(x - m_deviceOriginX) / m_scaleX) * m_signX + m_logicalOriginX; } -wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const +wxCoord wxDC::DeviceToLogicalY(wxCoord y) const { return wxRound((double)(y - m_deviceOriginY) / m_scaleY) * m_signY + m_logicalOriginY; } -wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const +wxCoord wxDC::DeviceToLogicalXRel(wxCoord x) const { return wxRound((double)(x) / m_scaleX); } -wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const +wxCoord wxDC::DeviceToLogicalYRel(wxCoord y) const { return wxRound((double)(y) / m_scaleY); } -wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const +wxCoord wxDC::LogicalToDeviceX(wxCoord x) const { return wxRound((double)(x - m_logicalOriginX) * m_scaleX) * m_signX + m_deviceOriginX; } -wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const +wxCoord wxDC::LogicalToDeviceY(wxCoord y) const { return wxRound((double)(y - m_logicalOriginY) * m_scaleY) * m_signY + m_deviceOriginY; } -wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const +wxCoord wxDC::LogicalToDeviceXRel(wxCoord x) const { return wxRound((double)(x) * m_scaleX); } -wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const +wxCoord wxDC::LogicalToDeviceYRel(wxCoord y) const { return wxRound((double)(y) * m_scaleY); } - +*/ // TODO #endif // wxMAC_USE_CORE_GRAPHICS