mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-15 00:09:41 +00:00
A radial gradient whose color line runs past 0 or 1 can get a circle with a negative radius once its stops are normalized to 0..1. Circles of a negative radius are not drawn: only the side of the circle of radius 0 (the tip of the cone) where the radius is positive is painted (https://learn.microsoft.com/en-us/typography/opentype/spec/colr, Radial gradients). Before: - As vector art, a padded gradient with a stop before 0 and its centers apart was focused on the start circle's center instead of the tip, and one with its centers together got stop offsets below 0. - Drawn into an image (a glyph with a sweep gradient, a Porter-Duff composite or a repeating gradient), any such gradient filled the glyph with its first stop's color. Both now recast the circles so neither radius is negative. With pad, the stops on the side that is not drawn become one stop at the tip with the color there; stops at the tip stay, so a sharp change of color there keeps the color on the drawn side. With repeat and reflect, the circles move by whole periods of the color line to the drawn side. When no circle is drawn, nothing is painted.