def paint.data

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

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

5541# The clips are read once over the mask's whole box: uniform there (the
5542# usual case, a shape inside the viewport clip), that limit serves every
5543# run and nothing reads the clips again; zero there paints nothing.
5544def paint.data(d: Cov.CovData, fb: Array<U32>, +gx: U32, +gy: U32, +size: U32, +fixed: F32, +tg: Target, +ctx: PaintCtx) -> Array<U32>:
5545  match d:
5546    case Cov.CovRows{rows}: paint.rows.mode(F32.is_ge(fixed, 0.0) && paint.ctx.solid(ctx), fb, rows, gx, gy, fixed, tg, ctx)
5547    case Cov.CovTreed{tree}: paint.tree(fb, tree, gx, gy, size, tg, ctx)

Uses (11)

Used by (1)