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:
@@ -206,9 +206,9 @@ bool wxBitmapBase::CopyFromIcon(const wxIcon& icon)
|
||||
// Trivial implementations of scale-factor related functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool wxBitmapBase::CreateScaled(int w, int h, int d, double logicalScale)
|
||||
bool wxBitmapBase::DoCreate(const wxSize& sz, double scale, int depth)
|
||||
{
|
||||
return Create(wxRound(w*logicalScale), wxRound(h*logicalScale), d);
|
||||
return Create(sz*scale, depth);
|
||||
}
|
||||
|
||||
void wxBitmapBase::SetScaleFactor(double WXUNUSED(scale))
|
||||
|
||||
Reference in New Issue
Block a user