diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:52:29 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:52:29 +0200 |
commit | d3e1925aa7388cd842408032621fae29133dd971 (patch) | |
tree | 02e0bd2fdc4bf0214d15c829d9ad5eebb0a03d38 /wx+ | |
parent | 6.8 (diff) | |
download | FreeFileSync-d3e1925aa7388cd842408032621fae29133dd971.tar.gz FreeFileSync-d3e1925aa7388cd842408032621fae29133dd971.tar.bz2 FreeFileSync-d3e1925aa7388cd842408032621fae29133dd971.zip |
6.9
Diffstat (limited to 'wx+')
-rw-r--r-- | wx+/image_tools.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wx+/image_tools.cpp b/wx+/image_tools.cpp index f45f3b6f..d36fb2fa 100644 --- a/wx+/image_tools.cpp +++ b/wx+/image_tools.cpp @@ -111,7 +111,7 @@ wxImage zen::stackImages(const wxImage& img1, const wxImage& img2, ImageStackLay namespace { -void makeWhiteTransparent(wxImage& image) //assume black text on white background +void calcAlphaForBlackWhiteImage(wxImage& image) //assume black text on white background { assert(image.HasAlpha()); if (unsigned char* alphaPtr = image.GetAlpha()) @@ -146,13 +146,13 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const if (text.empty()) return wxImage(); - wxBitmap newBitmap(getTextExtent(text, font)); + wxBitmap newBitmap(getTextExtent(text, font)); //seems we don't need to pass 24-bit depth here even for high-contrast color schemes { wxMemoryDC dc(newBitmap); dc.SetBackground(*wxWHITE_BRUSH); dc.Clear(); - dc.SetTextForeground(*wxBLACK); //for use in makeWhiteTransparent + dc.SetTextForeground(*wxBLACK); //for use in calcAlphaForBlackWhiteImage dc.SetTextBackground(*wxWHITE); // dc.SetFont(font); @@ -172,7 +172,7 @@ wxImage zen::createImageFromText(const wxString& text, const wxFont& font, const output.SetAlpha(); //calculate alpha channel - makeWhiteTransparent(output); + calcAlphaForBlackWhiteImage(output); //apply actual text color unsigned char* dataPtr = output.GetData(); |