lmi
[Top][All Lists]
Advanced

[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: Thu, 13 Aug 2020 22:15:47 +0200

On Sat, 8 Aug 2020 18:57:47 +0000 Greg Chicares <gchicares@sbcglobal.net> wrote:

GC> On 2020-08-07 23:54, Vadim Zeitlin wrote:
GC> > On Fri, 7 Aug 2020 17:19:25 +0000 Greg Chicares <gchicares@sbcglobal.net> 
wrote:
GC> > 
GC> > GC> To reproduce:
GC> > 
GC> >  Thanks, I'll try to do it a.s.a.p., but probably not before the end of 
the
GC> > next week.
GC> 
GC> All right. For the pending release (which notably includes wxWidgets
GC> and wxPdfDoc upgrades), I'll commit a one-line fix in lmi.

 FWIW I can confirm now that this was due to a "regression" in wxPdfDoc: I
put the word in quotes because what actually happened is that a missing
feature was implemented in this library. Previously it didn't support solid
background at all, and this was implemented (relatively) recently.
Unfortunately, this discovered the problem which you found due to using a
wrong, or at least inconsistent with wxDC, default background mode value,
which was set to solid instead of transparent by default.

 We've submitted a PR[*] to wxPdfDoc fixing this and I'll wait for some
time to see if it's accepted and them make another PR to lmi updating the
version of wxPdfDoc used in it and removing the workaround.

[*]: https://github.com/utelle/wxpdfdoc/pull/70

GC> >  There is wxDCTextBgModeChanger, however, which could be used if setting
GC> > the background mode to transparent also helps.
GC> 
GC> Please tell me if this change (commit bf74aeba74) doesn't look right.

 It looks almost right and definitely behaves correctly, the nitpick below
is purely cosmetic.

GC> I've tested it, and it does seem to fix the problem. But it's hard
GC> to find online examples that use these helper classes, and to figure
GC> out the argument I had to poke around in the source.
[...]
GC> +    // PDF !! This should not be necessary--see:
GC> +    //   https://lists.nongnu.org/archive/html/lmi/2020-08/msg00003.html
GC> +    wxDCTextBgModeChanger set_transparent_background(pdf_dc, 
wxPENSTYLE_TRANSPARENT);

 The argument is actually supposed to be wxBRUSHSTYLE_TRANSPARENT, but it
has exactly the same value as wxPENSTYLE_TRANSPARENT (and both have the
same value as just wxTRANSPARENT), so I don't think it's worth changing it,
especially as this line will be removed anyhow in the near future.

 Sorry again for missing this bug and thanks for finding/reporting/fixing
it!
VZ

Attachment: pgpN2HUL5g4UM.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]