GSoC Status - Week 7 (Customizable prints)

Gehad Elrobey gehadelrobey at gmail.com
Mon Jul 20 04:59:25 PDT 2015


On Mon, Jul 20, 2015 at 12:20 PM, Lubomir I. Ivanov <neolit123 at gmail.com>
wrote:

> On 20 July 2015 at 13:06, Gehad Elrobey <gehadelrobey at gmail.com> wrote:
> >
> >
> > On Sun, Jul 19, 2015 at 9:56 PM, Lubomir I. Ivanov <neolit123 at gmail.com>
> > wrote:
> >>
> >> On 19 July 2015 at 13:23, Gehad Elrobey <gehadelrobey at gmail.com> wrote:
> >> >
> >> >
> >> > On Fri, Jul 17, 2015 at 9:28 PM, Lubomir I. Ivanov <
> neolit123 at gmail.com>
> >> > wrote:
> >> >>
> >> >> On 17 July 2015 at 22:17, Lubomir I. Ivanov <neolit123 at gmail.com>
> >> >> wrote:
> >>
> >> >> > On 17 July 2015 at 22:10, Gehad Elrobey <gehadelrobey at gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> Yes it does, you can test it on current master.
> >> >> >>
> >> >> >
> >> >> >
> >> >> > this is technically a Qt bug of sorts, because the QPrintEngine
> >> >> > greyscale property for some *very odd* doesn't work in the preview
> >> >> > dialog.
> >> >>
> >> >> (edit) "some *very odd* reason".
> >> >>
> >> >> will need to go AFK in a bit; drop me a line when you need me to
> >> >> review again - e.g. tomorrow.
> >> >
> >> >
> >> > I have fixed the gray-scale issue as we discussed, Now we always use
> >> > QPrinter::setColorMode() during actual printing which produce nice
> >> > grayscale
> >> > prints, and use the css filter with the profile rasterization only
> >> > during
> >> > the previewing in the QPrintPreviewDialog with grayscale selected, I
> >> > pushed
> >> > the updates to my branch.
> >> >
> >>
> >> just pulled the latest commits (at 185eff2a60).
> >>
> >> the preview works as expected - rasterized when greyscale and vector
> >> when in color.
> >> but the actual print always ends in color for me (table and profile)!
> >>
> >> looking at the code the branch here is entered correctly:
> >>
> >> if (printOptions->color_selected && printerPtr->colorMode()) {
> >>     printerPtr->setColorMode(QPrinter::Color);
> >> } else {
> >>     printerPtr->setColorMode(QPrinter::GrayScale); // <-------------
> >> this is called when "print in color" is unchecked
> >> }
> >>
> >> but setColorMode() simply doesn't work!
> >> are you sure this works for you?
> >> if it works for you but not for me, it could be Qt version specific in
> >> which case setColorMode() is *completely unreliable* and we need to
> >> use the raster/greyscale/css thing for the actual print as well.
> >>
> >
> > Yes, setColorMode works fine for me using Qt 5.5.0 on arch linux, I have
> > attached a colored and gray-scale printouts with the current settings.
> >
>
> ok, in that case won't use setColorMode() at all. just make it raster
> for greyscale - same as the preview method and vector for color mode.
> the whole greyscale thing has taken too much time already and is very
> questionable on application level as most modern drivers and spoolers
> should have a greyscale override anyway.
>
>
Now we always rasterize for grayscale, I pushed the updates.

-- 
regards,

Gehad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150720/8817ee13/attachment.html>


More information about the subsurface mailing list