Svg.cover.image.clip: def of gralha-svg-render@0.1.0.1 Import: import gralha-svg-render@0.1.0.1/svg.bend as Svg Lines 4390-4398 of gralha-svg-render@0.1.0.1/svg.bend: https://jend.leeeet.dev/read.txt?path=gralha-svg-render@0.1.0.1/svg.bend&start_line=4390&end_line=4398 import Base # An image's own rectangle joins the scene clip, so its edges get coverage like # any shape (the bitmap read clamps to its edge pixels); iv maps device to local. def cover.image.clip(+brush: Brush, clip: Clip, +iv: Matrix, +frame: Raster, +sub: U32) -> Clip: match brush: case Bitmap{raster, inv, nearest}: +to = matrix.mul(inv, iv) +rect = cover.image.rect(raster) ClipIntersect{clip, ClipShape{edge.tree(rect), to, False{}, cover.edges(rect, matrix.inverse(to), False{}, frame, sub, True{})}} case _: clip Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Brush https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Clip https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Matrix https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=Raster https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=cover.edges https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=cover.image.rect https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=edge.tree https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=matrix.inverse https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=matrix.mul