On 2018-12-27 01:04-0000 António Rodrigues Tomé wrote:

Hi Alan
you must revisit the -bg comand argument.
[...]
P.s.

may it be that the -bg argument is only called after the device constructor
has been valled?

Nope, the -bg option works well normally.  But you were right I had to
revisit that option because in this case I screwed up the format of
that option.  Sorry about that!

Note to self: add a warning message from the -bg option if
a background colour is specified using a bad format (such as forgetting
the underscore between RGB colours and alpha value like I just did).

Here is an example with the correct -bg format

examples/c/x30c -dev pngqt -o test3_qt.png -fam -bg 00F_0.3

(note the underscore in the -bg option!).  This works properly with your
revised code and produces a "fake" checkerboard background for both
"display" and "pqiv" image viewer applications indicating both applications
detected a semi-transparent background.  Note also the size of the
checkerboard blocks in the two cases is different confirming those are
different artifacts added by these two applications (i.e., not
something added by the PLplot code or Qt library).

I have attached test3_qt.png.1 generated by the above command for
your fixed case.  Please let me know whether or not that gives
the same results as your platform with whatever image viewer
you are using to view that file.

I also confirmed that I don't get the checkerboards for the two
image viewing apps if I run

examples/c/x30c -dev pngqt -o test4_qt.png -fam -bg 00F_0.3

without your fix.

So your code fix appears to be good, but only seems to affect the background
for some reason.  But for the commit message I still need your best
speculation (or Qt documentation reference if you have that) as to
*why* that is the case and also *why* the old version of the
code appeared to work OK for background opaque colours without
the extra call to the fill method that you have put in now.

So to address these commit message issues please respond to my
previous questions about why ARGB32 is necessary in order to get the
background to work but RGB32 seems to be fine for our unmodified code
for the other transparency rendering that occurs, in, e.g., example
30.  And please also respond to my question about why you think that
opaque backgrounds but not semi-transparent background worked before
you added the extra call to the fill method.

The reason for putting this sort of detail in your commit messages, is
it is really helpful if someone runs "git blame
bindings/qt_gui/plqt.cpp" 10 years from now (by the way, you should
run that command for yourself right now to see what it does), spots
the commit associated with your change and then looks at the
corresponding git log message to help figure out what was on your mind
when you made the change you did.  (I use that technique all the time
now to figure out why previous code changes were done.)

Of course, if you found the combination of changes that worked by
simply trying some experiments, (i.e., you have no idea why this
change works) then state that. But I expect this fix was based on
something specific in your Qt knowledge so that is what I need from
you.

And to finish your part in getting this change pushed, please state
whatever tests you ran (in sufficient detail that I could replicate
those for myself) so I can append that information to the "Tested by:"
paragraph for you.

Alan
__________________________
Alan W. Irwin

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

Attachment: test3_qt.png.1
Description: working version with proper -bg formatting

_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to