def paint.run
gralha-svg-render@0.1.0.1 · svg.bend:5454
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
5454
5455
5456
5457
5458
5459def paint.run(fb: Array<U32>, +x0: U32, +x1: U32, +v: F32, +y: U32, +fixed: F32, +t: Target, +ctx: PaintCtx) -> Array<U32>:
5460 Target{tx, ty, tw, th} = t
5461 +bx = paint.from(x0, tx)
5462 +cols = paint.span(x0, (x1 - x0 : U32), tx, (tx + tw : U32))
5463 +known = U.choose(F32, F32.is_lt(fixed, 0.0), paint.block.limit(paint.ctx.clipped(ctx), paint.ctx.clips(ctx), bx, y, (bx + cols : U32), (y + 1 : U32)), fixed)
5464 paint.block.some(U32.is_eq(cols, 0) || F32.is_eq(known, 0.0), fb, bx, y, 1n, U32.to_nat(cols), v, known, t, ctx)
5465
5466@unsafe