def text.axis
gralha-svg-render@0.1.0.1 · svg.bend:3239
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
3239def text.axis(xs: List<&2, TextFrame>, +index: U32, +axis: U32) -> TextValue:
3240 match xs:
3241 case Nil{}: TextValue{0.0, False{}}
3242 case Con{TextFrame{start, xx, yy, dx, dy, angles}, rest}:
3243 text.axis.first(text.at(U.choose(List<&2, F32>, U32.is_eq(axis, 0), xx, U.choose(List<&2, F32>, U32.is_eq(axis, 1), yy,
3244 U.choose(List<&2, F32>, U32.is_eq(axis, 2), dx, U.choose(List<&2, F32>, U32.is_eq(axis, 3), dy, angles)))),
3245 (index - start : U32), U32.is_eq(axis, 4), TextValue{0.0, False{}}), _ => text.axis(rest, index, axis))