Fix for upside down bmp projections

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2002-05-10 04:09:27 +00:00
parent c3f7931401
commit ad6bd8701e
4 changed files with 38 additions and 39 deletions

View File

@@ -150,6 +150,22 @@ void wxMemoryDC::SelectObject(
if (!hBmp)
{
//
// Bmps drawn to are upside down, so flip it before committing
//
POINTL vPoint[4] = { 0, m_vSelectedBitmap.GetHeight(),
m_vSelectedBitmap.GetWidth(), 0,
0, 0, m_vSelectedBitmap.GetWidth(), m_vSelectedBitmap.GetHeight()
};
::GpiBitBlt( m_hPS
,m_hPS
,4
,vPoint
,ROP_SRCCOPY
,BBO_IGNORE
);
m_vSelectedBitmap.SetSelectedInto(NULL);
}
m_vSelectedBitmap = rBitmap;
@@ -157,6 +173,7 @@ void wxMemoryDC::SelectObject(
if (!hBmp)
{
m_hOldBitmap = (WXHBITMAP)::GpiSetBitmap(m_hPS, NULLHANDLE);
return;
}