Live Paint and Pattern Support

Top  Previous  Next

 

Live Paint -- This is a feature of recent versions of Adobe Illustrator that allows artists to quickly color areas separating path segments in a group of possibly overlapping graphics objects. It's not a requirement that the colors (or patterns) be assigned to specific objects in the group. For example, to create a tinted lake partially filling a cave passage it's not necessary to draw a separate closed path with much of its border coinciding with the cave wall outline. A non-closed path is all that's needed.

 

Of course a live paint object is more complicated than the set of objects selected for the "make" operation, and Illustrator will expand it during an export to SVG. The problem this causes from our standpoint is that the expansion will nest path objects inside unnamed groups. Ordinarily, and by design, this would prevent Walls from reshaping the paths if the live paint object were placed in a shp layer. (See SVG Layer Definitions.)

 

Fortunately it appears that Illustrator (CS6 at least) consistently encloses these unnamed groups in an SVG group element with an  id of the form XMLID_n_, where n is an integer. This allows Walls to identify it as a live paint object and treat the underlying unnamed groups in a special way. At least for now, when processing a merged SVG, Walls gives any XMLID group encountered in a shp layer a new name of the form W2Dn, and also gives the unnamed groups beneath it names of the form W2Dnsn. This is necessary because when  Illustrator imports an SVG file, even one that it created, it simply ignores (strips off) the XMLID names.  If the document were exported again, Walls would encounter sets of nested unnamed groups that are no longer recognizable as live paint objects. The renaming strategy has worked well so far during testing. It's also easy in Illustrator to turn a W2D group back into a live paint object if this were desired.

 

Patterns -- This is another Illustrator feature for which roundtripping support has been implemented recently. (In previous versions the SVG <pattern> element wasn't recognized.) It allows one to fill both shapes and strokes with patterns consisting of repeated tiles, either created or selected from Illustrator's swatch library.

 

The only problem noticed so far is that Illustrator CS6 can't always import exactly the same pattern that it exports to SVG. At least one complicated pattern in the library, a pattern named "Snake", will undergo a subtle transformation while still being recognizable. At least in testing so far, Walls2D (or Adobe SVG Viewer) will render the image the same way whether or it is processed by Walls. But this image can be different from the two versions of it seen in Illustrator, before and after the roundtrip. If you see this, a  reassignment of the pattern should fix the problem.