- From: Rik Cabanier <cabanier@gmail.com>
- Date: Mon, 6 Feb 2012 20:10:58 -0800
- To: Tavmjong Bah <tavmjong@free.fr>
- Cc: Israel Eisenberg <owlgems@yahoo.com>, Cyril Concolato <Cyril.Concolato@cisra.canon.com.au>, www-svg <www-svg@w3.org>
- Message-ID: <CAGN7qDCfm2mLgy8K3Sx1+BaAY0Dbz1JOqLRkOJ-+CaMvL-eH6Q@mail.gmail.com>
On Mon, Feb 6, 2012 at 12:12 PM, Tavmjong Bah <tavmjong@free.fr> wrote: > > Hi all, > > I apologize for not replying inline... me email client is making a mess > of the various quote styles in the last email. > > > @Rik: Yes, the question is how does Illustrator calculates the > colors/control points of the hidden patches. > I think it simply subdivides the patch. It's easy to create new control points (just split the beziers) and to calculate their color. By subidviding, I believe the mesh becomes smoother. > > @Rik: I don't mean ICC profile. I mean the change in a color's magnitude > across the patch. > speaking of color, do you use sRGB or linearRGB to create the mesh? > > @Israel: In your test at > http://owl3d.com/tests/Gradient_Mesh/lerpHermite.html , try putting in > the values [[0,0,0][127,127,127][255,255,255]]. The resulting gradient > has visual artifacts. In this case you don't want the derivative to be > zero at the border. You do want the derivative to be the same on both > sides and these derivatives may be different for the different colors. > > I find the keySpline idea interesting as this allows any slope at the > edge (but you would still have problems of needing to match slopes of > three different colors). I am not sure how you would paint an arbitrary > shaped patch. The Cairo rendering library algorithm of dividing a patch > horizontally into patches that have a width of no greater than one pixel > and then painting each of those patches as a Bezier line would need to > be modified in a non-trivial way. For export to PostScript/PDF one could > subdivide the patch as is done by Illustrator and export type 6 or 7 > patches. > > Tav > > > > > >
Received on Tuesday, 7 February 2012 04:15:06 UTC