mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 06:35:03 +00:00
A fourth gradient kind, conic (also accepted as `angle` or `conical`), sweeps the stops once around the center (the gradient's start), clockwise on the page from the vector, with a seam where the last stop meets the first. A negative aspect mirrors the sweep, and reflecting an object turns its sweep the other way, also for a conic without a vector or with a flat extent. - Gradient panel: a Conic button in the Type row; the Aspect Ratio field works for conic gradients and keeps a mirrored sweep mirrored. - Gradient tool: the extent ellipse, aspect handle and center ring of a radial gradient, without a focal point. - Rendering, swatch chips, transforms, warps, plug-in round trips, and Object > Expand into wedges or a mesh of columns around the center. - Commands: a negative `aspect` is an error for linear and radial gradients, and so is a `focal` point for a conic gradient. - PDF export writes a function-based shading whose calculator function turns the angle into the ramp, and PDF import reads a function-based shading that turns around the origin of its space back as a conic gradient, also when that origin lies outside the painted area. A PDF/A file, or a conic with more than 97 stops, gets an image instead. - SVG export writes 360 solid wedges clipped to the shape for opaque stops and an image otherwise, and a linear gradient on characters. - CSS export writes `conic-gradient(from ...)`, with the stops mirrored for a mirrored sweep. - EPS and legacy .ai export write 360 solid wedges; the .ai editing data holds a linear gradient along the vector with the same stops. - .af files: conical gradients open as conic gradients. - An export that writes the gradient in another form gives a warning. Supersedes #2326 and includes switch87's code from it. Co-authored-by: Gert Pellin <gert@pellin.be>