Re: [Inkscape-devel] Quality of gradients.
(revised version of message sent originally only to Gez.)
On 09-Jan-2016 12:33, Gez wrote:
For my professional work, the way inkscape renders gradients is a show- stopper. The quality of my work suffers if I don't apply one of those tedious workarounds discussed in this thread.
The EMF export function supports simple gradients as descriptions (high & low color values, scale and direction of linear gradient) and so are not quality limited in this manner. Perhaps in some instances you could export to EMF and then render from that in another application which doesn't have the 8bit limit?
Unfortunately there is no exact support for radial gradients in the EMF or EMF+ standards. Currently Inkscape emulates such gradients in EMF files with many small single colored elliptical slices. The best one could do with EMF would be to use the peculiar "triangle" gradient mode (Google "GRADIENT_FILL_TRIANGLE") to emulate a radial gradient. Then instead of rings it would be a lot of small wedges, each with its own part of the gradient. At the moment there is no code in Inkscape to do this. (EMF+, which is not yet supported at all in inkscape but is coded into libUEMF, has something called a "Path Gradient Brush" which is essentially a bunch of these triangle gradients merged, so that instead of specifying a lot of triangles, one specifies a center point and a path.) Going this route would be a one way trip, since the code for working back from multiple triangle gradients to a radial one would need to be pretty clever to look for and detect this sort of clustering and arrangement of gradients, especially since those EMF records need not be consecutive in the file. (Going from EMF+'s Path Gradient Brush to an SVG radial gradient would be easier because it would not have the multiple record problem.) Also an awful lot of these triangles might be needed to get a smooth looking radial gradient, that is, one that doesn't look like a set of nested polygons resulting from "contour lines" of constant colors. Perhaps slightly varying the angle in each slice would hide that effect a bit?
Anyway, for future reference:
EMF Triangle gradient (look about 1/3 down from the top) http://www.flounder.com/gradientfiller.htm
EMF+ Path Gradient Brush http://www.codeproject.com/Articles/20018/Gradients-made-easy
Regards,
David Mathog mathog@...1176... Manager, Sequence Analysis Facility, Biology Division, Caltech
participants (1)
-
mathog