From d3e1925aa7388cd842408032621fae29133dd971 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 2 Oct 2015 14:52:29 +0200 Subject: 6.9 --- wx+/image_tools.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'wx+') 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(); -- cgit