//! Shared helpers for `gradient-*` nodes.
use EvalCtx;
use crateAnchor;
/// Map a padded-canvas pixel to a "user-space" `(ux, uy)` coordinate
/// that the gradient's parameters are expressed in.
///
/// - `Tile` anchor: tile spans `[0, 1] × [0, 1]`. Padding pixels
/// extend slightly outside that range, which is intentional — the
/// gradient continues into the padded border consistently.
/// - `World` anchor: the full Mercator world at z=0 spans `[0, 1] ×
/// [0, 1]`, with `(0, 0)` at the top-left. The current tile occupies
/// `[x/2^z, (x+1)/2^z] × [y/2^z, (y+1)/2^z]`. World-anchored gradients
/// stay continuous across tile borders.
pub