mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 08:27:31 +00:00
swatch.unused grouped the gradients in use by their stop colors and compared each gradient swatch with every gradient in its group, so gradients that share stop colors but differ in offsets, midpoints, opacity, kind, method, dither or links still took quadratic time. Each gradient now has a key that is equal exactly when the gradients are equal: kind, method, dither, and each stop's offset, color, opacity, midpoint, link, tint and process plates. The gradients in use go into one hash set, and each gradient swatch is looked up in it.