GSoC Status - Week 7 (Customizable prints)

Gehad Elrobey gehadelrobey at gmail.com
Fri Jul 17 11:54:28 PDT 2015


On Fri, Jul 17, 2015 at 8:46 PM, Lubomir I. Ivanov <neolit123 at gmail.com>
wrote:

> On 17 July 2015 at 21:36, Tomaz Canabrava <tcanabrava at kde.org> wrote:
> >
> >>>> I am forces to render the dive profile on a QImage so that I can
> convert
> >>>> it to grayscale image and then render it on top of the QWebview, Do
> you
> >>>> think there is a way to convert the vector graphics to grayscale?
> >>>
> >>>
> >>>
> >>> graphicsview-common.h:QColor getColor(const color_indice_t i, bool
> >>> isGrayscale = false);
> >>>
> >>> so, 90% of the time we are using getColor without the isGrayscale
> >>> boolean, triggering the false state.
> >>> this is where you should do your stuff :)
> >>>
> >>> grep getColor inside qt-ui/profile and see where you should change.
> >>>
> >>>
> >>
> >> I already tried to do this, I also added isGrayscale members in
> >> DiveProfileItem, but there are some remaining elements that I couldn't
> >> change into grayscale (eg. cylinder pressure curve and numbers on
> >> horizontal/vertical axis) please check the screenshot attached, Am I
> missing
> >> something?
> >
> >
> >
> > yes, in a few places we are not using the get color correctly and this
> needs
> > to be fixed:
> >
> > tankitem.cpp ( see the setColorAt calls )
> > rulerItem.cpp ( check for QColor usage )
> > profileWidget.cpp ( check for QColor )
> > diveprofileItem.cpp ( check for "     // This paints the colors of the
> > velocities. " )
> >
> > getSacColor also doesn't takes into consideration printMode
> >
>
> thanks Tomaz,
> i admit that when i saw that profile2 didn't support the greyscale
> color table, i didn't even bother fixing this. :(
>
> Gehad, if we can't find an easy way to preserve everything in vector
> while in greyscale we may have to use the custom color table for the
> profile, after all.
> because having the profile and table in raster because of the
> greyscale mode is a bit subpar?
>
>
The QPrinter::setColorMode() work very nicely it converts the whole
printouts to grayscale pages without the need to rasterize the page, the
only drawback is that this doesn't work correctly with the
QPrintPreviewDialog which I think we may use the css filter way to work
around this issue - we will not have identical previewing and printing
methods though , what do you think?

-- 
regards,

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


More information about the subsurface mailing list