Just updated my mesh branch. Changes:
1. Moved much of the mesh handling code into one file.
2. Handles move when corners are moved. Currently angle between handle and corner is preserved with length between handle and corner changing proportional to change in length of side. Eventually this behavior and keeping length constant will be selectable.
3. Patch edges are now shown as Beziers.
4. Alt-B switches toggles selected side (those with both corner points selected) between Beziers and Lines.
5. Synced with trunk.
Note, there is a bug where color changes to corners aren't saved if a point is not moved afterwards.
Also, this version, like the previous, is unstable.
https://code.launchpad.net/~tavmjong-free/inkscape/mesh
Tav
On Thu, 2011-09-22 at 15:14 +0200, Tavmjong Bah wrote:
Hi,
I have just checked in to my private Coons Patch Mesh Gradient branch, code that allows the ability to create and edit mesh gradients. Warning: This code is a real Hack. It is known to segfault and eat kittens for lunch. It will need lots of reworking by real experts before one can hope to see it in Inkscape trunk (as well as dealing with the issue that meshes are not part of the SVG 1.2 standard... they have been accepted as part of SVG 2.0 but that standard is along way from being appearing even in a draft form).
What you can do with the code:
- Create a simple one patch square mesh the size of an objects bounding
box. (Select the third button on the Gradient Tool-Tool Bar and the double click the object.)
Drag corner nodes (diamonds).
Change color of corner nodes.
Drag handles (circles). There is no indication of what handle belongs
with which corner node or path so it can be confusing.
- Divide a row or column of patches into two rows or columns. (Double
click on the lines connecting corner nodes. Double clicking elsewhere may lead to a crash.) At the moment, the row or column is split down the middle.
- Save the mesh. The mesh is saved in the proposed SVG standard format
(highly likely to change).
- Read in saved meshes.
Some of what is missing:
Ability to undo node moves/color changes.
Ability to merge two rows or columns into one or delete edge rows or
columns.
- Ability to change paths between straight lines and Bezier curves.
Handles are shown even for straight lines.
Display of Bezier curves (they are shown as straight lines).
Stability (I did tell you it will segfault, didn't I?).
Sane coding.
Properly handling of gradient copying.
Auto-creation of conical gradients or other non-square gradient
types.
Output to PS/PDF/PNG(?)
Update to current trunk.
You can check out the code at:
https://code.launchpad.net/~tavmjong-free/inkscape/mesh
Tav
All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel