diff options
author | B. Stack <bgstack15@gmail.com> | 2022-06-26 16:00:37 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2022-06-26 16:00:37 +0000 |
commit | 2a026bc7d76875b88700bebc7c5a801fef881bfd (patch) | |
tree | f820b53379f3d14e103e2663e8b0ecd38d1b2105 /wx+/image_tools.cpp | |
parent | Merge branch 'b11.21' into 'master' (diff) | |
parent | add upstream 11.22 (diff) | |
download | FreeFileSync-2a026bc7d76875b88700bebc7c5a801fef881bfd.tar.gz FreeFileSync-2a026bc7d76875b88700bebc7c5a801fef881bfd.tar.bz2 FreeFileSync-2a026bc7d76875b88700bebc7c5a801fef881bfd.zip |
Merge branch '11.22' into 'master'11.22
add upstream 11.22
See merge request opensource-tracking/FreeFileSync!45
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) |