Add wxBitmap::CreateWithLogicalSize()

The new function has a more clear name than CreateScaled() it replaces
and uses a more useful parameter order, with the scale factor, which
must always be specified when using it, coming before, and not after,
the depth, which almost never needs to be specified and so can be left
at its default value in 99% of cases.
This commit is contained in:
Vadim Zeitlin
2022-01-22 22:32:40 +00:00
parent dad828da38
commit 94716fd801
14 changed files with 88 additions and 32 deletions

View File

@@ -4621,7 +4621,7 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
int w = wxMax(width, 250);
int h = wxMax(height + dblh, 400);
m_doubleBuffer = new wxBitmap;
m_doubleBuffer->CreateScaled( w, h, wxBITMAP_SCREEN_DEPTH, scaleFactor );
m_doubleBuffer->CreateWithLogicalSize( w, h, scaleFactor );
}
else
{
@@ -4635,7 +4635,7 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
if ( h < (height+dblh) ) h = height + dblh;
delete m_doubleBuffer;
m_doubleBuffer = new wxBitmap;
m_doubleBuffer->CreateScaled( w, h, wxBITMAP_SCREEN_DEPTH, scaleFactor );
m_doubleBuffer->CreateWithLogicalSize( w, h, scaleFactor );
}
}
}