[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Regression in group-quote PDF
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] Regression in group-quote PDF |
Date: |
Sat, 8 Aug 2020 01:54:24 +0200 |
On Fri, 7 Aug 2020 17:19:25 +0000 Greg Chicares <gchicares@sbcglobal.net> wrote:
GC> To reproduce:
Thanks, I'll try to do it a.s.a.p., but probably not before the end of the
next week.
GC> Now, since our recent wxWidgets and wxPdfDoc upgrade, it
GC> looks like the text block's background color has changed
GC> from transparent to white.
Right now I suspect a regression in wxPdfDoc, but I'll have to debug it to
be really sure.
GC> With this experimental patch:
GC>
GC> ---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
GC> diff --git a/group_quote_pdf_gen_wx.cpp b/group_quote_pdf_gen_wx.cpp
GC> index 1cde4709..fccff7a2 100644
GC> --- a/group_quote_pdf_gen_wx.cpp
GC> +++ b/group_quote_pdf_gen_wx.cpp
GC> @@ -887,6 +887,7 @@ void group_quote_pdf_generator_wx::output_image_header
GC> auto& pdf_dc = pdf_writer.dc();
GC>
GC> wxDCFontChanger set_bigger_font(pdf_dc, pdf_dc.GetFont().Scaled(1.5));
GC> + pdf_dc.SetTextBackground(wxTransparentColour);
GC> wxDCTextColorChanger set_white_text(pdf_dc, *wxWHITE);
GC>
GC> // Don't use html::text::from() here: instead, call
GC> --->8--->8--->8--->8--->8--->8--->8--->8--->8--->8--->8---
GC>
GC> everything seems to look okay.
Normally using pdf_dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT) should
work in the same way. But it also shouldn't be actually necessary, as
transparent background mode should be the default.
GC> But that's probably not in good taste: the wxDC_X_Changer classes,
GC> AIUI, are RAII objects so that their effects are localized, but my call
GC> to SetTextBackground() would seem to have a global effect, which might
GC> be undesirable elsewhere. I don't find any
GC> wxDCTextBackgroundColorChanger class (I guess it wouldn't be useful
GC> enough to justify its existence).
There is wxDCTextBgModeChanger, however, which could be used if setting
the background mode to transparent also helps.
Thanks for finding this regression,
VZ
pgpLlbVp9iFD2.pgp
Description: PGP signature
- [lmi] Regression in group-quote PDF, Greg Chicares, 2020/08/07
- Re: [lmi] Regression in group-quote PDF,
Vadim Zeitlin <=
- Re: [lmi] Regression in group-quote PDF, Greg Chicares, 2020/08/08
- Re: [lmi] Regression in group-quote PDF, Vadim Zeitlin, 2020/08/13
- Re: [lmi] Regression in group-quote PDF, Greg Chicares, 2020/08/13
- Re: [lmi] Regression in group-quote PDF, Vadim Zeitlin, 2020/08/13
- Re: [lmi] Regression in group-quote PDF, Vadim Zeitlin, 2020/08/14
- Re: [lmi] Regression in group-quote PDF, Greg Chicares, 2020/08/17
- Re: [lmi] Regression in group-quote PDF, Vadim Zeitlin, 2020/08/17