mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-10 09:59:47 -06:00
A gradient whose stops are not strictly increasing (repeated offsets, or a file's unsorted stops) sampled each Classic off-centre midpoint, and each freeform point when recoloring, by scanning the stops from the start, so many stops and points cost their product. Such stops now get an index of the furthest offset reached so far, which never decreases, and each sample finds the pair of stops sample() would pick by binary search, giving the same colour for any order of offsets.