X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/497b78dfacb5e739fe7da7869f3a92a2e2747dbc..e7300ec6d9ebbd1cfa2fcf12c0ce6e5aee85a152:/src/mgl/dc.cpp?ds=sidebyside diff --git a/src/mgl/dc.cpp b/src/mgl/dc.cpp index e9a24c404e..2409fcaaa2 100644 --- a/src/mgl/dc.cpp +++ b/src/mgl/dc.cpp @@ -4,7 +4,7 @@ // Author: Vaclav Slavik // Created: 2001/03/09 // RCS-ID: $Id$ -// Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) +// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -249,6 +249,7 @@ void wxDC::DoSetClippingRegionAsRegion(const wxRegion& region) // check if the DC is scaled or moved, and if yes, then // convert rg to device coordinates: if ( m_deviceOriginX != 0 || m_deviceOriginY != 0 || + m_logicalOriginX != 0 || m_logicalOriginY != 0 || XLOG2DEVREL(500) != 500 || YLOG2DEVREL(500) != 500 ) { region_t *mrg = rg.GetMGLRegion().rgnPointer(); @@ -331,9 +332,13 @@ void wxDC::Clear() } } -void wxDC::DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style) +extern void wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, + const wxColour & col, int style); + +void wxDC::DoFloodFill(wxCoord x, wxCoord y, + const wxColour& col, int style) { - wxFAIL_MSG( wxT("wxDC::DoFloodFill not implemented") ); + wxDoFloodFill(this, x, y, col, style); } bool wxDC::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const @@ -558,15 +563,8 @@ void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) if ( !m_penSelected ) SelectPen(); - // VS: MGLDC::rect() does not render rectangles that have width - // or height equal to 1, so we have to use MGLDC::line() - // instead... - if ( hh == 1 || ww == 1 ) - m_MGLDC->line(xx + m_penOfsX, yy + m_penOfsY, - xx + ww-1 + m_penOfsX, yy + hh-1 + m_penOfsY); - else - m_MGLDC->rect(xx + m_penOfsX, yy + m_penOfsY, - xx + ww + m_penOfsX, yy + hh + m_penOfsY); + m_MGLDC->rect(xx + m_penOfsX, yy + m_penOfsY, + xx + ww + m_penOfsX, yy + hh + m_penOfsY); } CalcBoundingBox(x, y); @@ -738,7 +736,7 @@ bool wxDC::SelectMGLFont() !wxTestFontEncoding(nativeEnc) ) { #if wxUSE_FONTMAP - if ( !wxTheFontMapper->GetAltForEncoding(encoding, &nativeEnc) ) + if ( !wxFontMapper::Get()->GetAltForEncoding(encoding, &nativeEnc) ) #endif { nativeEnc.mglEncoding = MGL_ENCODING_ASCII;