Use wxBitmap::GetLogicalXXX() instead of GetScaledXXX()

Replace old functions with the new ones in the library code itself.

Note that wxSTC and wxRichText still use GetScaledXXX(), but they're
different functions that might need to be renamed/dealt with separately.
This commit is contained in:
Vadim Zeitlin
2022-01-22 18:57:31 +00:00
parent 65bb454311
commit a81e0d83c1
29 changed files with 151 additions and 151 deletions

View File

@@ -298,7 +298,7 @@ void wxAuiGenericToolBarArt::DrawButton(
int textX = 0, textY = 0;
const wxBitmap& bmp = item.GetCurrentBitmapFor(wnd);
const wxSize bmpSize = bmp.IsOk() ? bmp.GetScaledSize() : wxSize(0, 0);
const wxSize bmpSize = bmp.IsOk() ? bmp.GetLogicalSize() : wxSize(0, 0);
if (m_textOrientation == wxAUI_TBTOOL_TEXT_BOTTOM)
{
@@ -425,10 +425,10 @@ void wxAuiGenericToolBarArt::DrawDropDownButton(
{
bmpX = buttonRect.x +
(buttonRect.width/2) -
(bmp.GetScaledWidth()/2);
(bmp.GetLogicalWidth()/2);
bmpY = buttonRect.y +
((buttonRect.height-textHeight)/2) -
(bmp.GetScaledHeight()/2);
(bmp.GetLogicalHeight()/2);
textX = rect.x + (rect.width/2) - (textWidth/2) + 1;
textY = rect.y + rect.height - textHeight - 1;
@@ -439,9 +439,9 @@ void wxAuiGenericToolBarArt::DrawDropDownButton(
bmpY = rect.y +
(rect.height/2) -
(bmp.GetScaledHeight()/2);
(bmp.GetLogicalHeight()/2);
textX = bmpX + wnd->FromDIP(3) + bmp.GetScaledWidth();
textX = bmpX + wnd->FromDIP(3) + bmp.GetLogicalWidth();
textY = rect.y +
(rect.height/2) -
(textHeight/2);
@@ -578,8 +578,8 @@ wxSize wxAuiGenericToolBarArt::GetToolSize(
if (!bmp.IsOk() && !(m_flags & wxAUI_TB_TEXT))
return wnd->FromDIP(wxSize(16,16));
int width = bmp.IsOk() ? bmp.GetScaledWidth() : 0;
int height = bmp.IsOk() ? bmp.GetScaledHeight() : 0;
int width = bmp.IsOk() ? bmp.GetLogicalWidth() : 0;
int height = bmp.IsOk() ? bmp.GetLogicalHeight() : 0;
if (m_flags & wxAUI_TB_TEXT)
{
@@ -724,8 +724,8 @@ void wxAuiGenericToolBarArt::DrawOverflowButton(wxDC& dc,
}
const wxBitmap overflowBmp = m_overflowBmp.GetBitmapFor(wnd);
int x = rect.x+1+(rect.width-overflowBmp.GetScaledWidth())/2;
int y = rect.y+1+(rect.height-overflowBmp.GetScaledHeight())/2;
int x = rect.x+1+(rect.width-overflowBmp.GetLogicalWidth())/2;
int y = rect.y+1+(rect.height-overflowBmp.GetLogicalHeight())/2;
dc.DrawBitmap(overflowBmp, x, y, true);
}

View File

@@ -639,7 +639,7 @@ void wxAuiDefaultDockArt::DrawCaption(wxDC& dc,
DrawIcon(dc, window, rect, pane);
const wxBitmap& icon = pane.icon.GetBitmapFor(window);
caption_offset += icon.GetScaledWidth() + window->FromDIP(3);
caption_offset += icon.GetLogicalWidth() + window->FromDIP(3);
}
if (pane.state & wxAuiPaneInfo::optionActive)
@@ -695,7 +695,7 @@ wxAuiDefaultDockArt::DrawIcon(wxDC& dc, wxWindow *window, const wxRect& rect, wx
int xOffset = window->FromDIP(2);
const wxBitmap& icon = pane.icon.GetBitmap(iconSize);
dc.DrawBitmap(icon,
rect.x+xOffset, rect.y+(rect.height-icon.GetScaledHeight())/2,
rect.x+xOffset, rect.y+(rect.height-icon.GetLogicalHeight())/2,
true);
}
@@ -796,7 +796,7 @@ void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc,
wxRect rect = _rect;
rect.y = rect.y + (rect.height/2) - (bmp.GetScaledHeight()/2);
rect.y = rect.y + (rect.height/2) - (bmp.GetLogicalHeight()/2);
if (button_state == wxAUI_BUTTON_STATE_PRESSED)
{
@@ -820,8 +820,8 @@ void wxAuiDefaultDockArt::DrawPaneButton(wxDC& dc,
// draw the background behind the button
dc.DrawRectangle(rect.x, rect.y,
bmp.GetScaledWidth() - window->FromDIP(1),
bmp.GetScaledHeight() - window->FromDIP(1));
bmp.GetLogicalWidth() - window->FromDIP(1),
bmp.GetLogicalHeight() - window->FromDIP(1));
}
// draw the button itself

View File

@@ -112,7 +112,7 @@ static void DrawButtons(wxDC& dc,
dc.SetPen(wxPen(bkcolour.ChangeLightness(75)));
// draw the background behind the button
dc.DrawRectangle(rect.x, rect.y, bmp.GetScaledWidth()-offset.x, bmp.GetScaledHeight()-offset.y);
dc.DrawRectangle(rect.x, rect.y, bmp.GetLogicalWidth()-offset.x, bmp.GetLogicalHeight()-offset.y);
}
// draw the button itself
@@ -563,10 +563,10 @@ void wxAuiGenericTabArt::DrawTab(wxDC& dc,
// draw bitmap
dc.DrawBitmap(bitmap,
bitmap_offset,
drawn_tab_yoff + (drawn_tab_height/2) - (bitmap.GetScaledHeight()/2),
drawn_tab_yoff + (drawn_tab_height/2) - (bitmap.GetLogicalHeight()/2),
true);
text_offset = bitmap_offset + bitmap.GetScaledWidth();
text_offset = bitmap_offset + bitmap.GetLogicalWidth();
text_offset += wnd->FromDIP(3); // bitmap padding
}
else
@@ -592,16 +592,16 @@ void wxAuiGenericTabArt::DrawTab(wxDC& dc,
if (m_flags & wxAUI_NB_BOTTOM)
offsetY = 1;
wxRect rect(tab_x + tab_width - bmp.GetScaledWidth() - wnd->FromDIP(1),
offsetY + (tab_height/2) - (bmp.GetScaledHeight()/2),
bmp.GetScaledWidth(),
wxRect rect(tab_x + tab_width - bmp.GetLogicalWidth() - wnd->FromDIP(1),
offsetY + (tab_height/2) - (bmp.GetLogicalHeight()/2),
bmp.GetLogicalWidth(),
tab_height);
IndentPressedBitmap(wnd->FromDIP(wxSize(1, 1)), &rect, close_button_state);
dc.DrawBitmap(bmp, rect.x, rect.y, true);
*out_button_rect = rect;
close_button_width = bmp.GetScaledWidth();
close_button_width = bmp.GetLogicalWidth();
}
wxString draw_text = wxAuiChopText(dc,
@@ -631,8 +631,8 @@ void wxAuiGenericTabArt::DrawTab(wxDC& dc,
{
const wxBitmap bitmap = page.bitmap.GetBitmapFor(wnd);
focusRectBitmap = wxRect(bitmap_offset, drawn_tab_yoff + (drawn_tab_height/2) - (bitmap.GetScaledHeight()/2),
bitmap.GetScaledWidth(), bitmap.GetScaledHeight());
focusRectBitmap = wxRect(bitmap_offset, drawn_tab_yoff + (drawn_tab_height/2) - (bitmap.GetLogicalHeight()/2),
bitmap.GetLogicalWidth(), bitmap.GetLogicalHeight());
}
if (page.bitmap.IsOk() && draw_text.IsEmpty())
@@ -697,7 +697,7 @@ wxSize wxAuiGenericTabArt::GetTabSize(wxDC& dc,
if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN)
{
// increase by button size plus the padding
tab_width += m_activeCloseBmp.GetBitmapFor(wnd).GetScaledWidth() + wnd->FromDIP(3);
tab_width += m_activeCloseBmp.GetBitmapFor(wnd).GetLogicalWidth() + wnd->FromDIP(3);
}
// if there's a bitmap, add space for it
@@ -778,15 +778,15 @@ void wxAuiGenericTabArt::DrawButton(wxDC& dc,
if (orientation == wxLEFT)
{
rect.SetX(in_rect.x);
rect.SetY(((in_rect.y + in_rect.height)/2) - (bmp.GetScaledHeight()/2));
rect.SetWidth(bmp.GetScaledWidth());
rect.SetHeight(bmp.GetScaledHeight());
rect.SetY(((in_rect.y + in_rect.height)/2) - (bmp.GetLogicalHeight()/2));
rect.SetWidth(bmp.GetLogicalWidth());
rect.SetHeight(bmp.GetLogicalHeight());
}
else
{
rect = wxRect(in_rect.x + in_rect.width - bmp.GetScaledWidth(),
((in_rect.y + in_rect.height)/2) - (bmp.GetScaledHeight()/2),
bmp.GetScaledWidth(), bmp.GetScaledHeight());
rect = wxRect(in_rect.x + in_rect.width - bmp.GetLogicalWidth(),
((in_rect.y + in_rect.height)/2) - (bmp.GetLogicalHeight()/2),
bmp.GetLogicalWidth(), bmp.GetLogicalHeight());
}
IndentPressedBitmap(wnd->FromDIP(wxSize(1, 1)), &rect, button_state);
@@ -981,9 +981,9 @@ void wxAuiSimpleTabArt::SetSizingInfo(const wxSize& tab_ctrl_size,
int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - wnd->FromDIP(4);
if (m_flags & wxAUI_NB_CLOSE_BUTTON)
tot_width -= m_activeCloseBmp.GetBitmapFor(wnd).GetScaledWidth();
tot_width -= m_activeCloseBmp.GetBitmapFor(wnd).GetLogicalWidth();
if (m_flags & wxAUI_NB_WINDOWLIST_BUTTON)
tot_width -= m_activeWindowListBmp.GetBitmapFor(wnd).GetScaledWidth();
tot_width -= m_activeWindowListBmp.GetBitmapFor(wnd).GetLogicalWidth();
if (tab_count > 0)
{
@@ -1147,14 +1147,14 @@ void wxAuiSimpleTabArt::DrawTab(wxDC& dc,
const wxBitmap bmp = bb.GetBitmapFor(wnd);
wxRect rect(tab_x + tab_width - bmp.GetScaledWidth() - 1,
tab_y + (tab_height/2) - (bmp.GetScaledHeight()/2) + 1,
bmp.GetScaledWidth(),
wxRect rect(tab_x + tab_width - bmp.GetLogicalWidth() - 1,
tab_y + (tab_height/2) - (bmp.GetLogicalHeight()/2) + 1,
bmp.GetLogicalWidth(),
tab_height - 1);
DrawButtons(dc, wnd->FromDIP(wxSize(1, 1)), rect, bmp, *wxWHITE, close_button_state);
*out_button_rect = rect;
close_button_width = bmp.GetScaledWidth();
close_button_width = bmp.GetLogicalWidth();
}
text_offset = tab_x + (tab_height/2) + ((tab_width-close_button_width)/2) - (textx/2);
@@ -1237,7 +1237,7 @@ wxSize wxAuiSimpleTabArt::GetTabSize(wxDC& dc,
if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN)
{
// increase by button size plus the padding
tab_width += m_activeCloseBmp.GetBitmapFor(wnd).GetScaledWidth() + wnd->FromDIP(3);
tab_width += m_activeCloseBmp.GetBitmapFor(wnd).GetLogicalWidth() + wnd->FromDIP(3);
}
if (m_flags & wxAUI_NB_TAB_FIXED_WIDTH)
@@ -1300,15 +1300,15 @@ void wxAuiSimpleTabArt::DrawButton(wxDC& dc,
if (orientation == wxLEFT)
{
rect.SetX(in_rect.x);
rect.SetY(((in_rect.y + in_rect.height)/2) - (bmp.GetScaledHeight()/2));
rect.SetWidth(bmp.GetScaledWidth());
rect.SetHeight(bmp.GetScaledHeight());
rect.SetY(((in_rect.y + in_rect.height)/2) - (bmp.GetLogicalHeight()/2));
rect.SetWidth(bmp.GetLogicalWidth());
rect.SetHeight(bmp.GetLogicalHeight());
}
else
{
rect = wxRect(in_rect.x + in_rect.width - bmp.GetScaledWidth(),
((in_rect.y + in_rect.height)/2) - (bmp.GetScaledHeight()/2),
bmp.GetScaledWidth(), bmp.GetScaledHeight());
rect = wxRect(in_rect.x + in_rect.width - bmp.GetLogicalWidth(),
((in_rect.y + in_rect.height)/2) - (bmp.GetLogicalHeight()/2),
bmp.GetLogicalWidth(), bmp.GetLogicalHeight());
}

View File

@@ -128,7 +128,7 @@ wxRect DrawCloseButton(wxDC& dc,
wxBitmap bmp(gtk_widget_render_icon(widget, GTK_STOCK_CLOSE, GTK_ICON_SIZE_SMALL_TOOLBAR, "tab"));
if(bmp.GetScaledWidth() != s_CloseIconSize || bmp.GetScaledHeight() != s_CloseIconSize)
if(bmp.GetLogicalWidth() != s_CloseIconSize || bmp.GetLogicalHeight() != s_CloseIconSize)
{
wxImage img = bmp.ConvertToImage();
img.Rescale(s_CloseIconSize, s_CloseIconSize);
@@ -313,7 +313,7 @@ void wxAuiGtkTabArt::DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& p
const wxBitmap bitmap = page.bitmap.GetBitmapFor(wnd);
// draw bitmap
int bitmapY = tab_rect.y +(tab_rect.height - bitmap.GetScaledHeight()) / 2;
int bitmapY = tab_rect.y +(tab_rect.height - bitmap.GetLogicalHeight()) / 2;
if(!page.active)
{
if (tab_pos == wxAUI_NB_TOP)
@@ -326,7 +326,7 @@ void wxAuiGtkTabArt::DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& p
bitmapY,
true);
textX += bitmap.GetScaledWidth() + padding;
textX += bitmap.GetLogicalWidth() + padding;
}
wxCoord textW, textH, textY;

View File

@@ -190,7 +190,7 @@ private:
// If we really have to, do create a bitmap just to get its size. Note
// we need the size in logical pixels here, it will be scaled later if
// necessary, so use GetScaledSize() and not GetSize().
// necessary, so use GetDIPSize() and not GetSize().
const wxBitmap bitmap = wxArtProvider::GetBitmap(id, client);
if ( bitmap.IsOk() )
return bitmap.GetDIPSize();

View File

@@ -153,7 +153,7 @@ void wxBitmapBundleImplSet::Init(const wxBitmap* bitmaps, size_t n)
// notably be the case when there is only a single high resolution bitmap
// provided, e.g. in the code predating wxBitmapBundle introduction but now
// using it due to implicit conversion to it from wxBitmap).
m_sizeDefault = m_entries[0].bitmap.GetScaledSize();
m_sizeDefault = m_entries[0].bitmap.GetLogicalSize();
// Should we check that all bitmaps really have unique sizes here? For now,
// don't bother with this, but we might want to do it later if it really

View File

@@ -2185,7 +2185,7 @@ wxSize wxDataViewCheckIconTextRenderer::GetSize() const
if ( m_value.GetIcon().IsOk() )
{
#ifdef __WXGTK3__
const wxSize sizeIcon = m_value.GetIcon().GetScaledSize();
const wxSize sizeIcon = m_value.GetIcon().GetLogicalSize();
#else
const wxSize sizeIcon = m_value.GetIcon().GetSize();
#endif
@@ -2226,7 +2226,7 @@ bool wxDataViewCheckIconTextRenderer::Render(wxRect cell, wxDC* dc, int state)
if ( drawIcon )
{
#ifdef __WXGTK3__
const wxSize sizeIcon = icon.GetScaledSize();
const wxSize sizeIcon = icon.GetLogicalSize();
#else
const wxSize sizeIcon = icon.GetSize();
#endif

View File

@@ -51,8 +51,8 @@ public:
return DoCreateBuffer(dc, w, h);
if ( !ms_buffer ||
w > ms_buffer->GetScaledWidth() ||
h > ms_buffer->GetScaledHeight() )
w > ms_buffer->GetLogicalWidth() ||
h > ms_buffer->GetLogicalHeight() )
{
delete ms_buffer;

View File

@@ -252,8 +252,8 @@ void wxGCDCImpl::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y,
wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid DC") );
wxCHECK_RET( bmp.IsOk(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid bitmap") );
int w = bmp.GetScaledWidth();
int h = bmp.GetScaledHeight();
int w = bmp.GetLogicalWidth();
int h = bmp.GetLogicalHeight();
if ( bmp.GetDepth() == 1 )
{
m_graphicContext->SetPen(*wxTRANSPARENT_PEN);

View File

@@ -134,7 +134,7 @@ wxBitmap GetImageListBitmap(const wxBitmap& bitmap, bool useMask, const wxSize&
// Ensure image size is the same as the size of the images on the image list.
wxBitmap bmpResized;
const wxSize sz = bmp.GetScaledSize();
const wxSize sz = bmp.GetLogicalSize();
if ( sz.x == imgSize.x && sz.y == imgSize.y )
{
bmpResized = bmp;
@@ -178,9 +178,9 @@ int wxGenericImageList::Add( const wxBitmap &bitmap )
return -1;
}
// We use the scaled, i.e. logical, size here as image list images size is
// specified in logical pixels, just as window coordinates and sizes are.
const wxSize bitmapSize = bitmap.GetScaledSize();
// We use the logical size here as image list images size is specified in
// logical pixels, just as window coordinates and sizes are.
const wxSize bitmapSize = bitmap.GetLogicalSize();
// There is a special case: a bitmap may contain more than one image,
// in which case we're supposed to chop it in parts, just as Windows

View File

@@ -72,7 +72,7 @@ wxSplashScreen::wxSplashScreen(const wxBitmap& bitmap, long splashStyle, int mil
m_window = new wxSplashScreenWindow(bitmap, this, wxID_ANY, pos, size, wxNO_BORDER);
SetClientSize(bitmap.GetScaledWidth(), bitmap.GetScaledHeight());
SetClientSize(bitmap.GetLogicalWidth(), bitmap.GetLogicalHeight());
if (m_splashStyle & wxSPLASH_CENTRE_ON_PARENT)
CentreOnParent();
@@ -173,7 +173,7 @@ static void wxDrawSplashBitmap(wxDC& dc, const wxBitmap& bitmap, int WXUNUSED(x)
#endif // USE_PALETTE_IN_SPLASH
dcMem.SelectObjectAsSource(bitmap);
dc.Blit(0, 0, bitmap.GetScaledWidth(), bitmap.GetScaledHeight(), &dcMem, 0, 0, wxCOPY,
dc.Blit(0, 0, bitmap.GetLogicalWidth(), bitmap.GetLogicalHeight(), &dcMem, 0, 0, wxCOPY,
true /* use mask */);
dcMem.SelectObject(wxNullBitmap);

View File

@@ -729,7 +729,7 @@ wxSize wxWizard::GetPageSize() const
if ( m_statbmp )
{
// make the page at least as tall as the bitmap
pageSize.IncTo(wxSize(0, m_bitmap.GetScaledHeight()));
pageSize.IncTo(wxSize(0, m_bitmap.GetLogicalHeight()));
}
if ( m_usingSizer )
@@ -943,10 +943,10 @@ bool wxWizard::ResizeBitmap(wxBitmap& bmp)
wxSize pageSize = m_sizerPage->GetSize();
if (pageSize == wxSize(0,0))
pageSize = GetPageSize();
int bitmapWidth = wxMax(bmp.GetScaledWidth(), GetMinimumBitmapWidth());
int bitmapWidth = wxMax(bmp.GetLogicalWidth(), GetMinimumBitmapWidth());
int bitmapHeight = pageSize.y;
if (!m_statbmp->GetBitmap().IsOk() || m_statbmp->GetBitmap().GetScaledHeight() != bitmapHeight)
if (!m_statbmp->GetBitmap().IsOk() || m_statbmp->GetBitmap().GetLogicalHeight() != bitmapHeight)
{
wxBitmap bitmap(bitmapWidth, bitmapHeight);
{
@@ -966,16 +966,16 @@ bool wxWizard::ResizeBitmap(wxBitmap& bmp)
if (GetBitmapPlacement() & wxWIZARD_HALIGN_LEFT)
x = 0;
else if (GetBitmapPlacement() & wxWIZARD_HALIGN_RIGHT)
x = bitmapWidth - bmp.GetScaledWidth();
x = bitmapWidth - bmp.GetLogicalWidth();
else
x = (bitmapWidth - bmp.GetScaledWidth())/2;
x = (bitmapWidth - bmp.GetLogicalWidth())/2;
if (GetBitmapPlacement() & wxWIZARD_VALIGN_TOP)
y = 0;
else if (GetBitmapPlacement() & wxWIZARD_VALIGN_BOTTOM)
y = bitmapHeight - bmp.GetScaledHeight();
y = bitmapHeight - bmp.GetLogicalHeight();
else
y = (bitmapHeight - bmp.GetScaledHeight())/2;
y = (bitmapHeight - bmp.GetLogicalHeight())/2;
dc.DrawBitmap(bmp, x, y, true);
dc.SelectObject(wxNullBitmap);
@@ -991,8 +991,8 @@ bool wxWizard::ResizeBitmap(wxBitmap& bmp)
bool wxWizard::TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap)
{
int w = bitmap.GetScaledWidth();
int h = bitmap.GetScaledHeight();
int w = bitmap.GetLogicalWidth();
int h = bitmap.GetLogicalHeight();
wxMemoryDC dcMem;
@@ -1002,7 +1002,7 @@ bool wxWizard::TileBitmap(const wxRect& rect, wxDC& dc, const wxBitmap& bitmap)
for (i = rect.x; i < rect.x + rect.width; i += w)
{
for (j = rect.y; j < rect.y + rect.height; j+= h)
dc.Blit(i, j, bitmap.GetScaledWidth(), bitmap.GetScaledHeight(), & dcMem, 0, 0);
dc.Blit(i, j, bitmap.GetLogicalWidth(), bitmap.GetLogicalHeight(), & dcMem, 0, 0);
}
dcMem.SelectObject(wxNullBitmap);

View File

@@ -2501,7 +2501,7 @@ void wxCellRendererPixbuf::Set(const wxBitmap& bitmap)
{
pixbufNew =
pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, false, 8,
int(bitmap.GetScaledWidth()), int(bitmap.GetScaledHeight()));
int(bitmap.GetLogicalWidth()), int(bitmap.GetLogicalHeight()));
}
}
g_object_set(G_OBJECT(this), "pixbuf", pixbuf, NULL);
@@ -2520,8 +2520,8 @@ wxCellRendererPixbufRender(GtkCellRenderer* cell, cairo_t* cr, GtkWidget* widget
wxCellRendererPixbufParentClass->render(cell, cr, widget, background_area, cell_area, flags);
else
{
const int x = (cell_area->width - int(bitmap.GetScaledWidth() )) / 2;
const int y = (cell_area->height - int(bitmap.GetScaledHeight())) / 2;
const int x = (cell_area->width - int(bitmap.GetLogicalWidth() )) / 2;
const int y = (cell_area->height - int(bitmap.GetLogicalHeight())) / 2;
bitmap.Draw(cr, cell_area->x + x, cell_area->y + y);
}
}

View File

@@ -567,7 +567,7 @@ void wxMemoryDCImpl::Setup()
m_ok = m_bitmap.IsOk();
if (m_ok)
{
m_size = m_bitmap.GetScaledSize();
m_size = m_bitmap.GetLogicalSize();
m_contentScaleFactor = m_bitmap.GetScaleFactor();
cairo_t* cr = m_bitmap.CairoCreate();
AdjustForRTL(cr);

View File

@@ -157,8 +157,8 @@ static gboolean wxGtkImageDraw(GtkWidget* widget, GdkEventExpose* event)
GtkAllocation alloc;
gtk_widget_get_allocation(widget, &alloc);
int x = (alloc.width - int(bitmap.GetScaledWidth() )) / 2;
int y = (alloc.height - int(bitmap.GetScaledHeight())) / 2;
int x = (alloc.width - int(bitmap.GetLogicalWidth() )) / 2;
int y = (alloc.height - int(bitmap.GetLogicalHeight())) / 2;
#ifdef __WXGTK3__
gtk_render_background(gtk_widget_get_style_context(widget),
cr, 0, 0, alloc.width, alloc.height);

View File

@@ -546,7 +546,7 @@ void wxHtmlImageCell::Layout(int w)
m_Width = w*m_bmpW/100;
if (!m_bmpHpresent && m_bitmap != NULL)
m_Height = m_bitmap->GetScaledHeight()*m_Width/m_bitmap->GetScaledWidth();
m_Height = m_bitmap->GetLogicalHeight()*m_Width/m_bitmap->GetLogicalWidth();
else
m_Height = static_cast<int>(m_scale*m_bmpH);
} else
@@ -623,10 +623,10 @@ void wxHtmlImageCell::Draw(wxDC& dc, int x, int y,
}
#endif
if (m_Width != m_bitmap->GetScaledWidth())
imageScaleX = (double) m_Width / (double) m_bitmap->GetScaledWidth();
if (m_Height != m_bitmap->GetScaledHeight())
imageScaleY = (double) m_Height / (double) m_bitmap->GetScaledHeight();
if (m_Width != m_bitmap->GetLogicalWidth())
imageScaleX = (double) m_Width / (double) m_bitmap->GetLogicalWidth();
if (m_Height != m_bitmap->GetLogicalHeight())
imageScaleY = (double) m_Height / (double) m_bitmap->GetLogicalHeight();
double us_x, us_y;
dc.GetUserScale(&us_x, &us_y);

View File

@@ -58,7 +58,7 @@ wxSize wxBitmapButton::DoGetBestSize() const
if ( GetBitmapLabel().IsOk() )
{
const wxSize bitmapSize = GetBitmapLabel().GetScaledSize();
const wxSize bitmapSize = GetBitmapLabel().GetLogicalSize();
best += bitmapSize;
// The NSRoundedBezelStyle and NSTexturedRoundedBezelStyle used when

View File

@@ -164,7 +164,7 @@ WXImage wxOSXImageFromBitmap( const wxBitmap& bmp)
{
WXImage image;
#if wxOSX_USE_COCOA
NSSize sz = NSMakeSize(bmp.GetScaledWidth(), bmp.GetScaledHeight());
NSSize sz = NSMakeSize(bmp.GetLogicalWidth(), bmp.GetLogicalHeight());
image = [[NSImage alloc] initWithSize:sz];
wxOSXAddBitmapToImage(image, bmp);
#else

View File

@@ -77,8 +77,8 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
"Bitmap is selected in another wxMemoryDC, delete the first wxMemoryDC or use SelectObject(NULL)" );
m_selected.SetSelectedInto(GetOwner());
m_width = bitmap.GetScaledWidth();
m_height = bitmap.GetScaledHeight();
m_width = bitmap.GetLogicalWidth();
m_height = bitmap.GetLogicalHeight();
m_contentScaleFactor = bitmap.GetScaleFactor();
CGColorSpaceRef genericColorSpace = wxMacGetGenericRGBColorSpace();
CGContextRef bmCtx = (CGContextRef) m_selected.GetHBITMAP();
@@ -106,9 +106,9 @@ void wxMemoryDCImpl::DoGetSize( int *width, int *height ) const
if (m_selected.IsOk())
{
if (width)
(*width) = m_selected.GetScaledWidth();
(*width) = m_selected.GetLogicalWidth();
if (height)
(*height) = m_selected.GetScaledHeight();
(*height) = m_selected.GetLogicalHeight();
}
else
{

View File

@@ -4625,8 +4625,8 @@ void wxPropertyGrid::OnResize( wxSizeEvent& event )
}
else
{
int w = m_doubleBuffer->GetScaledWidth();
int h = m_doubleBuffer->GetScaledHeight();
int w = m_doubleBuffer->GetLogicalWidth();
int h = m_doubleBuffer->GetLogicalHeight();
// Double buffer must be large enough
if ( w < width || h < (height+dblh) )

View File

@@ -368,7 +368,7 @@ int wxRibbonAUIArtProvider::GetTabCtrlHeight(
const wxRibbonPageTabInfo& info = pages.Item(i);
if(info.page->GetIcon().IsOk())
{
icon_height = wxMax(icon_height, info.page->GetIcon().GetScaledHeight());
icon_height = wxMax(icon_height, info.page->GetIcon().GetLogicalHeight());
}
}
}
@@ -455,9 +455,9 @@ void wxRibbonAUIArtProvider::DrawTab(wxDC& dc,
{
if(icon.IsOk())
{
int x = tab.rect.x + (tab.rect.width - icon.GetScaledWidth()) / 2;
int x = tab.rect.x + (tab.rect.width - icon.GetLogicalWidth()) / 2;
dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 -
icon.GetScaledHeight()) / 2, true);
icon.GetLogicalHeight()) / 2, true);
}
}
}
@@ -483,7 +483,7 @@ void wxRibbonAUIArtProvider::DrawTab(wxDC& dc,
int offset = 0;
if(icon.IsOk())
offset += icon.GetScaledWidth() + 2;
offset += icon.GetLogicalWidth() + 2;
int text_height;
int text_width;
dc.GetTextExtent(label, &text_width, &text_height);
@@ -498,7 +498,7 @@ void wxRibbonAUIArtProvider::DrawTab(wxDC& dc,
if(icon.IsOk())
{
dc.DrawBitmap(icon, x - offset, tab.rect.y + (tab.rect.height -
icon.GetScaledHeight()) / 2, true);
icon.GetLogicalHeight()) / 2, true);
}
dc.SetClippingRegion(x, tab.rect.y, width, tab.rect.height);
dc.DrawText(label, x, y);
@@ -545,8 +545,8 @@ void wxRibbonAUIArtProvider::GetBarTabWidth(
}
if((m_flags & wxRIBBON_BAR_SHOW_PAGE_ICONS) && bitmap.IsOk())
{
width += bitmap.GetScaledWidth();
min += bitmap.GetScaledWidth();
width += bitmap.GetLogicalWidth();
min += bitmap.GetLogicalWidth();
}
if(ideal != NULL)
@@ -883,8 +883,8 @@ void wxRibbonAUIArtProvider::DrawMinimisedPanel(
if(bitmap.IsOk())
{
dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetScaledWidth()) / 2,
preview.y + (preview.height - bitmap.GetScaledHeight()) / 2, true);
dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetLogicalWidth()) / 2,
preview.y + (preview.height - bitmap.GetLogicalHeight()) / 2, true);
}
}
@@ -1092,7 +1092,7 @@ void wxRibbonAUIArtProvider::DrawButtonBarButton(
{
case wxRIBBON_BUTTONBAR_BUTTON_LARGE:
{
int iYBorder = rect.y + bitmap_large.GetScaledHeight() + 4;
int iYBorder = rect.y + bitmap_large.GetLogicalHeight() + 4;
wxRect partial_bg(rect);
if(state & wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED)
{
@@ -1255,8 +1255,8 @@ void wxRibbonAUIArtProvider::DrawTool(
dc.DrawBitmap(m_toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
bg_rect.y + (bg_rect.height / 2) - 2, true);
}
dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetScaledWidth()) / 2,
bg_rect.y + (bg_rect.height - bitmap.GetScaledHeight()) / 2, true);
dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetLogicalWidth()) / 2,
bg_rect.y + (bg_rect.height - bitmap.GetLogicalHeight()) / 2, true);
}
#endif // wxUSE_RIBBON

View File

@@ -1444,9 +1444,9 @@ void wxRibbonMSWArtProvider::DrawTab(
{
int x = tab.rect.x + 4;
if((m_flags & wxRIBBON_BAR_SHOW_PAGE_LABELS) == 0)
x = tab.rect.x + (tab.rect.width - icon.GetScaledWidth()) / 2;
x = tab.rect.x + (tab.rect.width - icon.GetLogicalWidth()) / 2;
dc.DrawBitmap(icon, x, tab.rect.y + 1 + (tab.rect.height - 1 -
icon.GetScaledHeight()) / 2, true);
icon.GetLogicalHeight()) / 2, true);
}
}
if(m_flags & wxRIBBON_BAR_SHOW_PAGE_LABELS)
@@ -1478,8 +1478,8 @@ void wxRibbonMSWArtProvider::DrawTab(
int x = tab.rect.x + 3;
if(m_flags & wxRIBBON_BAR_SHOW_PAGE_ICONS)
{
x += 3 + tab.page->GetIcon().GetScaledWidth();
width -= 3 + tab.page->GetIcon().GetScaledWidth();
x += 3 + tab.page->GetIcon().GetLogicalWidth();
width -= 3 + tab.page->GetIcon().GetLogicalWidth();
}
int y = tab.rect.y + (tab.rect.height - text_height) / 2;
@@ -1514,7 +1514,7 @@ void wxRibbonMSWArtProvider::DrawTabSeparator(
// The tab separator is relatively expensive to draw (for its size), and is
// usually drawn multiple times sequentially (in different positions), so it
// makes sense to draw it once and cache it.
if(!m_cached_tab_separator.IsOk() || m_cached_tab_separator.GetScaledSize() != rect.GetSize() || visibility != m_cached_tab_separator_visibility)
if(!m_cached_tab_separator.IsOk() || m_cached_tab_separator.GetLogicalSize() != rect.GetSize() || visibility != m_cached_tab_separator_visibility)
{
wxRect size(rect.GetSize());
ReallyDrawTabSeparator(wnd, size, visibility);
@@ -1524,7 +1524,7 @@ void wxRibbonMSWArtProvider::DrawTabSeparator(
void wxRibbonMSWArtProvider::ReallyDrawTabSeparator(wxWindow* wnd, const wxRect& rect, double visibility)
{
if(!m_cached_tab_separator.IsOk() || m_cached_tab_separator.GetScaledSize() != rect.GetSize())
if(!m_cached_tab_separator.IsOk() || m_cached_tab_separator.GetLogicalSize() != rect.GetSize())
{
m_cached_tab_separator = wxBitmap(rect.GetSize());
}
@@ -2326,8 +2326,8 @@ void wxRibbonMSWArtProvider::DrawMinimisedPanel(
if(bitmap.IsOk())
{
dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetScaledWidth()) / 2,
preview.y + (preview.height - 7 - bitmap.GetScaledHeight()) / 2, true);
dc.DrawBitmap(bitmap, preview.x + (preview.width - bitmap.GetLogicalWidth()) / 2,
preview.y + (preview.height - 7 - bitmap.GetLogicalHeight()) / 2, true);
}
if (!wnd->IsHovered())
@@ -2506,7 +2506,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButton(
{
case wxRIBBON_BUTTONBAR_BUTTON_LARGE:
{
int iYBorder = rect.y + bitmap_large.GetScaledHeight() + 4;
int iYBorder = rect.y + bitmap_large.GetLogicalHeight() + 4;
wxRect partial_bg(rect);
if(state & wxRIBBON_BUTTONBAR_BUTTON_NORMAL_HOVERED)
{
@@ -2612,9 +2612,9 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
{
const int padding = 2;
dc.DrawBitmap(bitmap_large,
rect.x + (rect.width - bitmap_large.GetScaledWidth()) / 2,
rect.x + (rect.width - bitmap_large.GetLogicalWidth()) / 2,
rect.y + padding, true);
int ypos = rect.y + padding + bitmap_large.GetScaledHeight() + padding;
int ypos = rect.y + padding + bitmap_large.GetLogicalHeight() + padding;
int arrow_width = kind == wxRIBBON_BUTTON_NORMAL ? 0 : 8;
wxCoord label_w, label_h;
dc.GetTextExtent(label, &label_w, &label_h);
@@ -2666,8 +2666,8 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground(
{
int x_cursor = rect.x + 2;
dc.DrawBitmap(bitmap_small, x_cursor,
rect.y + (rect.height - bitmap_small.GetScaledHeight())/2, true);
x_cursor += bitmap_small.GetScaledWidth() + 2;
rect.y + (rect.height - bitmap_small.GetLogicalHeight())/2, true);
x_cursor += bitmap_small.GetLogicalWidth() + 2;
wxCoord label_w, label_h;
dc.GetTextExtent(label, &label_w, &label_h);
dc.DrawText(label, x_cursor,
@@ -2808,8 +2808,8 @@ void wxRibbonMSWArtProvider::DrawTool(
dc.DrawBitmap(m_toolbar_drop_bitmap, bg_rect.x + avail_width + 2,
bg_rect.y + (bg_rect.height / 2) - 2, true);
}
dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetScaledWidth()) / 2,
bg_rect.y + (bg_rect.height - bitmap.GetScaledHeight()) / 2, true);
dc.DrawBitmap(bitmap, bg_rect.x + (avail_width - bitmap.GetLogicalWidth()) / 2,
bg_rect.y + (bg_rect.height - bitmap.GetLogicalHeight()) / 2, true);
}
void
@@ -2894,8 +2894,8 @@ void wxRibbonMSWArtProvider::GetBarTabWidth(
}
if((m_flags & wxRIBBON_BAR_SHOW_PAGE_ICONS) && bitmap.IsOk())
{
width += bitmap.GetScaledWidth();
min += bitmap.GetScaledWidth();
width += bitmap.GetLogicalWidth();
min += bitmap.GetLogicalWidth();
}
if(ideal != NULL)
@@ -2944,7 +2944,7 @@ int wxRibbonMSWArtProvider::GetTabCtrlHeight(
const wxRibbonPageTabInfo& info = pages.Item(i);
if(info.page->GetIcon().IsOk())
{
icon_height = wxMax(icon_height, info.page->GetIcon().GetScaledHeight() + 4);
icon_height = wxMax(icon_height, info.page->GetIcon().GetLogicalHeight() + 4);
}
}
}

View File

@@ -104,7 +104,7 @@ public:
{
bitmap_large = MakeResizedBitmap(bitmap_small, bitmap_size_large);
}
else if(bitmap_large.GetScaledSize() != bitmap_size_large)
else if(bitmap_large.GetLogicalSize() != bitmap_size_large)
{
bitmap_large = MakeResizedBitmap(bitmap_large, bitmap_size_large);
}
@@ -113,7 +113,7 @@ public:
{
bitmap_small = MakeResizedBitmap(bitmap_large, bitmap_size_small);
}
else if(bitmap_small.GetScaledSize() != bitmap_size_small)
else if(bitmap_small.GetLogicalSize() != bitmap_size_small)
{
bitmap_small = MakeResizedBitmap(bitmap_small, bitmap_size_small);
}
@@ -418,7 +418,7 @@ wxRibbonButtonBarButtonBase* wxRibbonButtonBar::InsertButton(
{
if(bitmap.IsOk())
{
m_bitmap_size_large = bitmap.GetScaledSize();
m_bitmap_size_large = bitmap.GetLogicalSize();
if(!bitmap_small.IsOk())
{
m_bitmap_size_small = m_bitmap_size_large;
@@ -427,7 +427,7 @@ wxRibbonButtonBarButtonBase* wxRibbonButtonBar::InsertButton(
}
if(bitmap_small.IsOk())
{
m_bitmap_size_small = bitmap_small.GetScaledSize();
m_bitmap_size_small = bitmap_small.GetLogicalSize();
if(!bitmap.IsOk())
{
m_bitmap_size_large = m_bitmap_size_small;

View File

@@ -538,12 +538,12 @@ wxRibbonGalleryItem* wxRibbonGallery::Append(const wxBitmap& bitmap, int id)
wxASSERT(bitmap.IsOk());
if(m_items.IsEmpty())
{
m_bitmap_size = bitmap.GetScaledSize();
m_bitmap_size = bitmap.GetLogicalSize();
CalculateMinSize();
}
else
{
wxASSERT(bitmap.GetScaledSize() == m_bitmap_size);
wxASSERT(bitmap.GetLogicalSize() == m_bitmap_size);
}
wxRibbonGalleryItem *item = new wxRibbonGalleryItem;

View File

@@ -693,7 +693,7 @@ bool wxRibbonPanel::Realize()
wxSize panel_min_size = GetMinNotMinimisedSize();
m_minimised_size = m_art->GetMinimisedPanelMinimumSize(temp_dc, this,
&bitmap_size, &m_preferred_expand_direction);
if(m_minimised_icon.IsOk() && m_minimised_icon.GetScaledSize() != bitmap_size)
if(m_minimised_icon.IsOk() && m_minimised_icon.GetLogicalSize() != bitmap_size)
{
double scale = m_minimised_icon.GetScaleFactor();
if (scale > 1.0)

View File

@@ -247,7 +247,7 @@ wxRibbonToolBarToolBase* wxRibbonToolBar::InsertTool(
tool->bitmap = bitmap;
if(bitmap_disabled.IsOk())
{
wxASSERT(bitmap.GetScaledSize() == bitmap_disabled.GetScaledSize());
wxASSERT(bitmap.GetLogicalSize() == bitmap_disabled.GetLogicalSize());
tool->bitmap_disabled = bitmap_disabled;
}
else
@@ -779,7 +779,7 @@ bool wxRibbonToolBar::Realize()
{
wxRibbonToolBarToolBase* tool = group->tools.Item(t);
tool->size = m_art->GetToolSize(temp_dc, this,
tool->bitmap.GetScaledSize(), tool->kind, t == 0,
tool->bitmap.GetLogicalSize(), tool->kind, t == 0,
t == (tool_count - 1), &tool->dropdown);
if(t == 0)
tool->state |= wxRIBBON_TOOLBAR_TOOL_FIRST;

View File

@@ -12534,7 +12534,7 @@ bool wxRichTextImage::LoadImageCache(wxDC& dc, wxRichTextDrawingContext& context
// Don't repeat unless absolutely necessary
if (m_imageCache.IsOk() && !resetCache && !context.GetLayingOut())
{
retImageSize = wxSize(m_imageCache.GetScaledWidth(), m_imageCache.GetScaledHeight());
retImageSize = wxSize(m_imageCache.GetLogicalWidth(), m_imageCache.GetLogicalHeight());
return true;
}
@@ -12549,7 +12549,7 @@ bool wxRichTextImage::LoadImageCache(wxDC& dc, wxRichTextDrawingContext& context
m_imageCache = bitmap;
m_imageState = ImageState_Loaded;
}
retImageSize = wxSize(m_imageCache.GetScaledWidth(), m_imageCache.GetScaledHeight());
retImageSize = wxSize(m_imageCache.GetLogicalWidth(), m_imageCache.GetLogicalHeight());
return true;
}
@@ -12567,7 +12567,7 @@ bool wxRichTextImage::LoadImageCache(wxDC& dc, wxRichTextDrawingContext& context
{
wxBitmap bitmap(image_placeholder24x24_xpm);
m_imageCache = bitmap;
m_originalImageSize = wxSize(bitmap.GetScaledWidth(), bitmap.GetScaledHeight());
m_originalImageSize = wxSize(bitmap.GetLogicalWidth(), bitmap.GetLogicalHeight());
m_imageState = ImageState_Bad;
retImageSize = m_originalImageSize;
return false;
@@ -12699,7 +12699,7 @@ bool wxRichTextImage::LoadAndScaleImageCache(wxImage& image, const wxSize& sz, w
int width = sz.x;
int height = sz.y;
if (m_imageCache.IsOk() && m_imageCache.GetScaledWidth() == width && m_imageCache.GetScaledHeight() == height)
if (m_imageCache.IsOk() && m_imageCache.GetLogicalWidth() == width && m_imageCache.GetLogicalHeight() == height)
{
// Do nothing, we didn't need to change the image cache
changed = false;

View File

@@ -81,7 +81,7 @@ TEST_CASE("BitmapBundle::Scaled", "[bmpbundle]")
// scaled size as default size.
wxBitmap scaled2x(64, 64);
scaled2x.SetScaleFactor(2);
CHECK( scaled2x.GetScaledSize() == wxSize(32, 32) );
CHECK( scaled2x.GetLogicalSize() == wxSize(32, 32) );
wxBitmapBundle b(scaled2x);
CHECK( b.GetDefaultSize() == wxSize(32, 32) );

View File

@@ -765,8 +765,8 @@ TEST_CASE("ImageList:HiDPI", "[imagelist][hidpi]")
REQUIRE(bmp1x.IsOk());
CHECK(bmp1x.GetWidth() == 16);
CHECK(bmp1x.GetHeight() == 8);
CHECK(bmp1x.GetScaledWidth() == 16);
CHECK(bmp1x.GetScaledHeight() == 8);
CHECK(bmp1x.GetLogicalWidth() == 16);
CHECK(bmp1x.GetLogicalHeight() == 8);
CHECK_FALSE(bmp1x.HasAlpha());
CHECK(bmp1x.GetMask() == NULL);
@@ -774,8 +774,8 @@ TEST_CASE("ImageList:HiDPI", "[imagelist][hidpi]")
REQUIRE(bmp2x.IsOk());
CHECK(bmp2x.GetWidth() == 16);
CHECK(bmp2x.GetHeight() == 8);
CHECK(bmp2x.GetScaledWidth() == 8);
CHECK(bmp2x.GetScaledHeight() == 4);
CHECK(bmp2x.GetLogicalWidth() == 8);
CHECK(bmp2x.GetLogicalHeight() == 4);
CHECK_FALSE(bmp2x.HasAlpha());
CHECK(bmp2x.GetMask() == NULL);
@@ -803,8 +803,8 @@ TEST_CASE("ImageList:HiDPI", "[imagelist][hidpi]")
wxBitmap bmp = il.GetBitmap(1);
CHECK(bmp.IsOk() == true);
CHECK(bmp.GetScaleFactor() == 2.0);
CHECK(bmp.GetScaledWidth() == 8);
CHECK(bmp.GetScaledHeight() == 4);
CHECK(bmp.GetLogicalWidth() == 8);
CHECK(bmp.GetLogicalHeight() == 4);
CHECK(bmp.GetWidth() == 16);
CHECK(bmp.GetHeight() == 8);
CHECK_FALSE(bmp.HasAlpha());
@@ -835,8 +835,8 @@ TEST_CASE("ImageList:HiDPI", "[imagelist][hidpi]")
wxBitmap bmp = il.GetBitmap(1);
CHECK(bmp.IsOk() == true);
CHECK(bmp.GetScaleFactor() == 1.0);
CHECK(bmp.GetScaledWidth() == 16);
CHECK(bmp.GetScaledHeight() == 8);
CHECK(bmp.GetLogicalWidth() == 16);
CHECK(bmp.GetLogicalHeight() == 8);
CHECK(bmp.GetWidth() == 16);
CHECK(bmp.GetHeight() == 8);
CHECK_FALSE(bmp.HasAlpha());
@@ -867,8 +867,8 @@ TEST_CASE("ImageList:HiDPI", "[imagelist][hidpi]")
wxBitmap bmp = il.GetBitmap(0);
CHECK(bmp.IsOk() == true);
CHECK(bmp.GetScaleFactor() == 2.0);
CHECK(bmp.GetScaledWidth() == 8);
CHECK(bmp.GetScaledHeight() == 4);
CHECK(bmp.GetLogicalWidth() == 8);
CHECK(bmp.GetLogicalHeight() == 4);
CHECK(bmp.GetWidth() == 16);
CHECK(bmp.GetHeight() == 8);
CHECK_FALSE(bmp.HasAlpha());
@@ -898,8 +898,8 @@ TEST_CASE("ImageList:HiDPI", "[imagelist][hidpi]")
wxBitmap bmp = il.GetBitmap(0);
CHECK(bmp.GetScaleFactor() == 1.0);
CHECK(bmp.GetScaledWidth() == 16);
CHECK(bmp.GetScaledHeight() == 8);
CHECK(bmp.GetLogicalWidth() == 16);
CHECK(bmp.GetLogicalHeight() == 8);
CHECK(bmp.GetWidth() == 16);
CHECK(bmp.GetHeight() == 8);
CHECK_FALSE(bmp.HasAlpha());
@@ -916,8 +916,8 @@ TEST_CASE("ImageList:HiDPI", "[imagelist][hidpi]")
REQUIRE(bmp2x2.IsOk());
CHECK(bmp2x2.GetWidth() == 32);
CHECK(bmp2x2.GetHeight() == 16);
CHECK(bmp2x2.GetScaledWidth() == 16);
CHECK(bmp2x2.GetScaledHeight() == 8);
CHECK(bmp2x2.GetLogicalWidth() == 16);
CHECK(bmp2x2.GetLogicalHeight() == 8);
CHECK(bmp2x2.HasAlpha() == false);
CHECK(bmp2x2.GetMask() == NULL);
@@ -939,8 +939,8 @@ TEST_CASE("ImageList:HiDPI", "[imagelist][hidpi]")
wxBitmap bmp = il.GetBitmap(0);
CHECK(bmp.GetScaleFactor() == 1.0);
CHECK(bmp.GetScaledWidth() == 16);
CHECK(bmp.GetScaledHeight() == 8);
CHECK(bmp.GetLogicalWidth() == 16);
CHECK(bmp.GetLogicalHeight() == 8);
CHECK(bmp.GetWidth() == 16);
CHECK(bmp.GetHeight() == 8);
CHECK_FALSE(bmp.HasAlpha());
@@ -963,8 +963,8 @@ TEST_CASE("ImageList:HiDPI", "[imagelist][hidpi]")
bmp = il.GetBitmap(0);
CHECK(bmp.GetScaleFactor() == 2.0);
CHECK(bmp.GetScaledWidth() == 16);
CHECK(bmp.GetScaledHeight() == 8);
CHECK(bmp.GetLogicalWidth() == 16);
CHECK(bmp.GetLogicalHeight() == 8);
CHECK(bmp.GetWidth() == 32);
CHECK(bmp.GetHeight() == 16);
CHECK_FALSE(bmp.HasAlpha());