Hi Alan,
this really may be a qt related issue. But it is not a qt5 issue as the result is the same with qt4.8.
Most likely the import rgb images format available in qt does not quite mach the ARGB format output from memcairo.

Regards,



On Thu, Jul 31, 2014 at 7:40 PM, Alan W. Irwin <irwin@beluga.phys.uvic.ca> wrote:
On 2014-07-31 15:47+0100 António Rodrigues Tomé wrote:

Hello,

as the qt driver for qt5 is not 100% yet I decided to play a little with
the memcairo driver with the aim of latter on rendering a qt widget with
the driver output, avoiding the need of  outputting a png file and then
rendering a widget (this latter case works pretty well).

My question is if the memcairo ignores the plscolbga calling?

I'm attaching three screenshots based in the x01c example.

test0.png was obtained by converting the memcairo driver output to qt but
considering it was a RGB image and not a ARGB. I'm including it only
because I found it fun the fact it is exactly the output of the original
example in spite I've called  plscolbga  function.

test1.png results from  importing the memcairo output considering it an
ARGB image, swapping the rgb obtaining exactly the same colors for the
lines and labels but the background stays white.

test2.png is the result I would like to had for test1 as it is makes
exactly the same call to plscolbga but the output was obtained by  pngcairo
instead of memcairo.

I also attach a zip file with the qt program I used to obtained the
screenshots. There is three actions in the actions menu,  each of the
actions corresponds to one of the screenshots.

I made the program in qt5 but it should be easy to compile and run it with
qt4.8 as it also shoud be very easy to read as +90% of the code is from
x01c.

Hi António:

I had a quick look at drivers/cairo.c, and could not spot any obvious
problems with colour and transparency handling for memcairo.

Furthermore, since you have previously found obvious display
differences between the various qt device drivers for your particular
installation of Qt5, and there are other problems with Qt5 (i.e.,
character alignment) that I confirm here, the present issue may just
be another example of the result from a Qt5 bug which can only be
fixed by Qt5 developers.

For now, the evidence seems to be that Qt5 is pretty unreliable so I
suggest you try the same experiments with Qt4.8 to see if all those
issues you are encountering with Qt5 go away.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

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
__________________________



--
António Rodrigues Tomé
Universidade da Beira Interior
Instituto D. Luís (lab associado)
email address:
artome@gmail.com
artome@ubi.pt