diff options
author | B. Stack <bgstack15@gmail.com> | 2022-06-26 11:59:57 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-06-26 11:59:57 -0400 |
commit | 03efe856012a55165542a3ac5c9055c25723f5e8 (patch) | |
tree | f820b53379f3d14e103e2663e8b0ecd38d1b2105 /wx+/image_tools.cpp | |
parent | Merge branch 'b11.21' into 'master' (diff) | |
download | FreeFileSync-03efe856012a55165542a3ac5c9055c25723f5e8.tar.gz FreeFileSync-03efe856012a55165542a3ac5c9055c25723f5e8.tar.bz2 FreeFileSync-03efe856012a55165542a3ac5c9055c25723f5e8.zip |
add upstream 11.22
Diffstat (limited to 'wx+/image_tools.cpp')
-rw-r--r-- | wx+/image_tools.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wx+/image_tools.cpp b/wx+/image_tools.cpp index ccbd05e2..2df24b6e 100644 --- a/wx+/image_tools.cpp +++ b/wx+/image_tools.cpp @@ -169,6 +169,7 @@ wxImage zen::stackImages(const wxImage& img1, const wxImage& img2, ImageStackLay wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const wxColor& col, ImageStackAlignment textAlign) { wxMemoryDC dc; //the context used for bitmaps + setScaleFactor(dc, getDisplayScaleFactor()); dc.SetFont(font); //the font parameter of GetMultiLineTextExtent() is not evaluated on OS X, wxWidgets 2.9.5, so apply it to the DC directly! std::vector<std::pair<wxString, wxSize>> lineInfo; //text + extent @@ -187,8 +188,9 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const return wxNullImage; wxBitmap newBitmap(maxWidth, lineHeight * lineInfo.size()); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes + newBitmap.SetScaleFactor(getDisplayScaleFactor()); { - dc.SelectObject(newBitmap); + dc.SelectObject(newBitmap); //copies scale factor from wxBitmap ZEN_ON_SCOPE_EXIT(dc.SelectObject(wxNullBitmap)); if (wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft) |