use wxMemoryDC::SelectObjectAsSource() for const wxBitmaps
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42983 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -647,7 +647,7 @@ bool wxMGLBitmapHandler::SaveFile(const wxBitmap *bitmap, const wxString& name,
|
|||||||
int w = bitmap->GetWidth(),
|
int w = bitmap->GetWidth(),
|
||||||
h = bitmap->GetHeight();
|
h = bitmap->GetHeight();
|
||||||
|
|
||||||
mem.SelectObject(*bitmap);
|
mem.SelectObjectAsSource(*bitmap);
|
||||||
tdc = mem.GetMGLDC();
|
tdc = mem.GetMGLDC();
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
|
@@ -35,7 +35,7 @@ void wxBitmapToPixPattern(const wxBitmap& bitmap,
|
|||||||
|
|
||||||
if ( pix != NULL )
|
if ( pix != NULL )
|
||||||
{
|
{
|
||||||
mem.SelectObject(bitmap);
|
mem.SelectObjectAsSource(bitmap);
|
||||||
dc = mem.GetMGLDC();
|
dc = mem.GetMGLDC();
|
||||||
wxCurrentDCSwitcher curDC(dc);
|
wxCurrentDCSwitcher curDC(dc);
|
||||||
dc->beginPixel();
|
dc->beginPixel();
|
||||||
@@ -50,7 +50,7 @@ void wxBitmapToPixPattern(const wxBitmap& bitmap,
|
|||||||
|
|
||||||
if ( mask && bitmap.GetMask() )
|
if ( mask && bitmap.GetMask() )
|
||||||
{
|
{
|
||||||
mem.SelectObject(bitmap.GetMask()->GetBitmap());
|
mem.SelectObjectAsSource(bitmap.GetMask()->GetBitmap());
|
||||||
dc = mem.GetMGLDC();
|
dc = mem.GetMGLDC();
|
||||||
wxCurrentDCSwitcher curDC(dc);
|
wxCurrentDCSwitcher curDC(dc);
|
||||||
dc->beginPixel();
|
dc->beginPixel();
|
||||||
|
Reference in New Issue
Block a user