Hi,
I've gotten a number of queries as to when mesh gradients will be available in Inkscape. Some people seem to think that it is a project that is close to being ready... it is not. There is still a lot of work to do and several major issues to be resolved. So I though I would give a status report:
At the moment, you can create, edit, save, read in both Coons Patch meshes and tensor meshes (the latter have not been approved by the SVG working group). There are a few nice editing features available: Conical gradients, sampling color from beneath the mesh, toggling between straight edges and curves, etc. However, the code is very buggy. Expect frequent crashes. Save often. Undo does not work for most things. Revert is a poor person's substitute.
Before the mesh code can be merged with trunk the following issues MUST be resolved:
1. Meshes have been approved for SVG 2 but the syntax has not been finalized and will not likely be finalized for some time. For meshes to be included in Inkscape we will need to keep them in the Inkscape namespace for the moment and include a fallback mechanism. (Note, there are quite a few nice SVG 2.0 features that we could adopt quickly if we had a way of handling fallbacks: markers that inherit stroke color, solid colors that will eliminate the need for the one-stop gradient hack for creating a palette, etc.).
2. Meshes rely on Cairo trunk. We need an official Cairo release with the mesh rendering code. The last new Cairo release was in Sept of 2010. Who knows when a new release will be made.
3. My code is a hack. There are multiple issues that need to be resolved. The most important one is how do meshes fit into the Private/Vector structure used by linear and radial gradients (Inkscape gradients are broken up into two gradient elements, one that handles the geometric layout and the other that handles the color vector. This allows reuse of the same gradient to be applied to multiple objects. It may not make sense for meshes.) Of course all the crashes must be eliminated.
4. GUI: How should meshes fit into the GUI? Should meshes have their own tool bar? The gradient chooser is not really applicable for meshes and meshes will have lots of their own options:
* Mesh creation: * Mesh type: Normal, conical, ? * Number of rows/columns. * Mesh editing: * Show/hide handles. * Make handle smooth/symmetric.
5. Saving to PDF/PostScript needs to be implemented. (Export to PNG works.)
I am sure I've missed some.
Issues that would be nice to address:
1. Node editing. Gradients implement their own dragger code. It would be nice to be able to use the code from path editing. This would enable things like editing the paths by dragging or selecting a group of nodes and rotate/scale/etc. them together.
2. Auto generating an initial grid based on path shape.
3. Auto fitting. It would be the nice to be able to layout a rough mesh and have Inkscape adjust the mesh to match an underlying drawing. My branch can already set the mesh corner colors by sampling the image underneath which is a real time saver.
4. Auto smoothing of patch boundaries. I have an initial implementation that attempts to make color transitions across patch boundaries smooth. This can certainly be improved.
Tav