processing4 icon indicating copy to clipboard operation
processing4 copied to clipboard

Adds gradient export to SVG library

Open tracerstar opened this issue 2 years ago • 0 comments

Adding an extension handler to the SVG library to allow linear and radial gradients to export as SVG

The extension handler is a copy of https://gist.github.com/msteiger/4509119 by Martin Steiger with minor changes for Processing

Several classes and methods in PShapeSVG and PShapeJava2D have been made public or modified to support the export of gradients

Current SVG export of gradients results in fill:none on the shapes, leaving everything filled black. This adds gradients into the export handler, allowing fill:url(#gradientID) to work as expected.

tracerstar avatar Aug 13 '23 18:08 tracerstar