Rename wxBitmap::CreateWithLogicalSize() to CreateWithDIPSize()

The new name, recently introduced in 94716fd801 (Add
wxBitmap::CreateWithLogicalSize(), 2022-01-22), was perhaps more clear,
but also misleading and confusing because the postcondition

	CreateWithLogicalSize(size, 2).GetLogicalSize() == size

was not satisfied under MSW, so rename it once again, and hopefully
finally, because the new name is consistent with GetDIPSize() returning
the same size.

Also try to improve the documentation a bit more.
This commit is contained in:
Vadim Zeitlin
2022-02-11 17:30:57 +00:00
parent 20f82e2ccb
commit 74424cbeb2
13 changed files with 53 additions and 48 deletions

View File

@@ -961,7 +961,7 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const
wxBitmap ret;
double scale = GetScaleFactor();
ret.CreateWithLogicalSize( rect.GetSize(), scale, GetDepth() );
ret.CreateWithDIPSize( rect.GetSize(), scale, GetDepth() );
wxASSERT_MSG( ret.IsOk(), wxT("GetSubBitmap error") );
if ( HasAlpha() )
ret.UseAlpha() ;
@@ -1039,7 +1039,7 @@ bool wxBitmap::Create(int w, int h, int d)
bool wxBitmap::Create(int w, int h, const wxDC& dc)
{
double factor = dc.GetContentScaleFactor();
return CreateWithLogicalSize(w, h, factor);
return CreateWithDIPSize(w, h, factor);
}
bool wxBitmap::DoCreate(const wxSize& size, double scale, int d)