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