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:
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user