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

@@ -172,10 +172,10 @@ use "Logical", "Physical" or "DIP" in their names, the only exceptions are:
- Size passed to wxBitmap constructors taking one, as well as the size returned
by wxBitmap::GetWidth() and wxBitmap::GetHeight() is in physical pixels. You
can use wxBitmap::CreateWithLogicalSize() and wxBitmap::GetLogicalWidth(),
wxBitmap::GetLogicalHeight() and wxBitmap::GetLogicalSize() to use or get the
size in logical pixels which must be used in any computations involving the
sizes expressed in logical units.
can use wxBitmap::CreateWithDIPSize() and wxBitmap::GetDIPSize() or
wxBitmap::GetLogicalSize() to use or get the size in DPI-independent or
logical pixels (notably, the latter must be used in any computations
involving the sizes expressed in logical units).
- Similarly, the size returned by wxBitmapBundle::GetPreferredBitmapSizeFor()
is in physical pixels, but wxBitmapBundle::GetPreferredLogicalSizeFor() can
be used to retrieve the same value in logical units.