On 17 July 2015 at 21:42, Tomaz Canabrava <[email protected]> wrote: > We d > > On Fri, Jul 17, 2015 at 3:37 PM, Lubomir I. Ivanov <[email protected]> > wrote: >> >> On 17 July 2015 at 21:13, Gehad Elrobey <[email protected]> wrote: >> > >> > >> > On Fri, Jul 17, 2015 at 8:08 PM, Lubomir I. Ivanov <[email protected]> >> > wrote: >> >> >> >> hello Gehad, >> >> >> >> without looking at the code, the greyscale mode works as expected, but >> >> both the Preview and actual Print now razterize everything on Windows >> >> (profile and table). we want them in vector graphics on all OSes and >> >> Qt versions where possible. >> >> >> >> perhaps, that's something you've overlooked? >> > >> > >> > 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? >> > >> >> i see... >> well bummer, i can't find if Qt has shaders, custom color palettes, >> "color delegates" and such for QPicture/QPainter. which means that to >> convert something to greyscale it needs to be rasterized first. Tomaz, >> if you have any idea, do say. >> >> i guess for now you can only *rasterize* the profile if greyscale is >> enabled. >> but this isn't a pretty solution...we may have to attempt to use the >> custom color tables for the profile after all (i.e. what Tomaz brought >> back). :( >> >> but why are the tables raster - are you rasterizing the whole page? >> shouldn't the CSS greyscale filter preserve the vector? > > > Just found out: > http://doc.qt.io/qt-5/qcolormap.html >
i can see some QImage examples, but non to affect a whole QPainter/QPaintDevice. but overall, i don't think that QPicture supports palettes and greyscale, because it acts like a script. :( lubomir -- _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
