def filter.matrix.hue

gralha-svg-render@0.1.0.1 · svg.bend:4483

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base

4483def filter.matrix.hue(angle: F32) -> ColorMatrix:
4484  +rad = (angle * 0.017453292519943295 : F32)
4485  +c = F32.cos(rad)
4486  +s = F32.sin(rad)
4487  ColorMatrix{ColorRow{(0.213 + 0.787 * c - 0.213 * s : F32), (0.715 - 0.715 * c - 0.715 * s : F32), (0.072 - 0.072 * c + 0.928 * s : F32), 0.0, 0.0}, ColorRow{(0.213 - 0.213 * c + 0.143 * s : F32), (0.715 + 0.285 * c + 0.140 * s : F32), (0.072 - 0.072 * c - 0.283 * s : F32), 0.0, 0.0}, ColorRow{(0.213 - 0.213 * c - 0.787 * s : F32), (0.715 - 0.715 * c + 0.715 * s : F32), (0.072 + 0.928 * c + 0.072 * s : F32), 0.0, 0.0}, ColorRow{0.0, 0.0, 0.0, 1.0, 0.0}}

Uses (8)

Used by (1)