~/bend-docscommunity

svg.bend relies on unsafe/foreign

raw source on the hub · import gralha-svg-render@0.1.0.0/svg.bend as Svg

SVG parsing, geometry, painting and rasterization. No foreign code.

10 imports
import Base
import gralha-text-scan@0.1.0.0/scan.bend as U
import gralha-xml-doc@0.1.0.0/xml.bend as XML
import gralha-css-style@0.1.0.0/css.bend as CSS
import gralha-bytes@0.1.0.0/bytes.bend as Bin
import gralha-image@0.1.0.0/image.bend as Img
import gralha-png-decode@0.1.0.0/png.bend as PNG
import gralha-jpeg-decode@0.1.0.0/jpeg.bend as JPEG
import gralha-coverage@0.1.0.0/cover.bend as Cov
import gralha-truetype@0.1.0.0/font.bend as Font

Types

type Matrix source · line 22 · raw

Data

Affine transforms, composed in SVG's column - vector order.

type Point source · line 43 · raw

Data

type Edge source · line 95 · raw

Data

Paths are flattened in user coordinates. The fill-only closing edge of an open subpath is kept separate from its stroked edges. An edge is one heap node: its endpoints are stored as four numbers, so building, walking and freeing edge lists touch half the nodes a pair of points would.

type Cover source · line 106 · raw

Data

---- analytic coverage ---- A cover is a pixel-space coverage mask (see cover.bend) together with the raster grid it was built for, so device points map straight to its cells.

type PathNext source · line 216 · raw

Data

What follows a command's numbers, scanned one step ahead: kind is 0 at the end of the data, 1 at a letter, 2 at a number repeating the pending command, 3 at anything else.

type Params source · line 219 · raw

Data

type MarkerSegment source · line 270 · raw

Data

Preserve source segment endpoints and analytic tangents only when requested.

type Path source · line 296 · raw

Data

type Bounds source · line 558 · raw

Data

type Raster source · line 602 · raw

Data

type ColorToken source · line 689 · raw

Data

Img.Color arguments retain separators and units; unlike SVG coordinates, these functions do not permit adjacent numbers or mixed comma/slash syntax.

type MarkerSubpath source · line 931 · raw

Data

type MarkerVertex source · line 980 · raw

Data

type StrokeSettings source · line 1027 · raw

Data

Stroke geometry is compiled once. Overlapping parts form a union, so alpha is applied once even at joins, caps and self intersections.

type Picked source · line 1095 · raw

Data

The style properties an element's own attributes may set, picked up in one pass over the attribute list (the first occurrence of a key counts, as a lookup by name would find it), so inheritance reads them without a walk per property.

type Subpath source · line 1183 · raw

Data

type Sub source · line 1235 · raw

Data

The polylines under construction: the current one's points (reversed) and the finished subpaths.

type Segment source · line 1270 · raw

Data

type DashPattern source · line 1294 · raw

Data

Dash intervals are measured along each flattened subpath. A dash crossing a vertex gets a join; a dash ending there gets a cap instead.

type DashCursor source · line 1297 · raw

Data

type DashRun source · line 1300 · raw

Data

type Joins source · line 1426 · raw

Data

The join and cap of a stroke as codes, decided once per stroke instead of by name at every vertex: cap 0 butt, 1 round, 2 square; join 0 miter, 1 round, 2 bevel, 3 miter-clip.

type Prev source · line 1512 · raw

Data

The previous segment along a side: its direction, the end of its offset (not yet emitted, since an inner join replaces it) and its length.

type EdgeTree source · line 1837 · raw

Data

A shape's edges with their bounds. Point queries walk the list; rasters read the list back directly, so no per-edge tree is ever built.

type Fill source · line 1874 · raw

Data

A fill keeps its bounds for the scene box and, once built for a raster, the cover that gives each pixel its exact coverage. The edges stay with the scene alone, so building the cover consumes them as their owner (the covered scene keeps none); a point query without a cover, picking on the compiled scene, walks them from there.

type StrokeMesh source · line 1897 · raw

Data

The stroke outline as an edge tree in local units, with its inverse matrix (device to local) and, after the cover pass, its coverage.

type MarkerStyle source · line 1912 · raw

Data

type Style source · line 1954 · raw

Data

Compilation resolves geometry and inherited presentation once per edit.

type Prop source · line 1979 · raw

Data

The properties a resource may inherit, in the order every resolved list carries them; a resolved parent list starts with the same keys in the same order, so a parent's value is read positionally and only the element's own attributes are searched by name.

type Stop source · line 2071 · raw

Data

Gradient resources are compiled into paint functions before rasterization.

type Clip source · line 2074 · raw

Data

type Paint source · line 2080 · raw

@-B:Data -> Data

type FilterEffect source · line 2083 · raw

Data

type Scene source · line 2088 · raw

@-B:Data -> Data

type Brush source · line 2092 · raw

Data

type Parameter source · line 2198 · raw

Data

type EmbeddedImage source · line 2651 · raw

Data

type Viewport source · line 2710 · raw

Data

type MaskData source · line 2811 · raw

Data

A mask is rendered as a transparent subscene before its alpha/luminance is used.

type Work source · line 3137 · raw

Data

An element's path data is taken out of its attributes before they are shared, so the path parser owns that text; the loop carries the element in that state as a step of its own.

type TextFont source · line 3168 · raw

Data

XML.Text layout produces internal glyph geometry while preserving text/tspan groups.

type TextFrame source · line 3218 · raw

Data

type TextValue source · line 3225 · raw

Data

type TextPosition source · line 3247 · raw

Data

type TextChunk source · line 3253 · raw

Data

type TextCursor source · line 3256 · raw

Data

type TextLayout source · line 3344 · raw

Data

type TextMeasure source · line 3409 · raw

Data

Length fitting is applied inside-out; an explicitly fitted child is one fixed unit.

type TextFit source · line 3449 · raw

Data

type TextPaintRun source · line 3643 · raw

Data

type ImageCodepoint source · line 3778 · raw

Data

Expand data-URI SVG images into isolated vector subdocuments.

type FilterInput source · line 4427 · raw

Data

A source alpha input shares its buffer; only the returned RGB channels change.

type ColorRow source · line 4443 · raw

Data

type ColorMatrix source · line 4446 · raw

Data

type Transfer source · line 4497 · raw

Data

type FilterTap source · line 4615 · raw

Data

type Convolution source · line 4619 · raw

Data

Convolution kernels operate on a pixel grid; edge extension precedes interpolation.

type FilterOp source · line 4622 · raw

Data

type FilterWindow source · line 4730 · raw

Data

type FilterResult source · line 4840 · raw

Data

Filter inputs form an ordered graph. Results only see preceding primitives.

type Target source · line 5124 · raw

Data

A layer covers the device rectangle at (x, y) of w by h pixels; pixel (px, py) lives at index (py - y) * w + (px - x). The frame is the target at the origin; a group's layer is only as large as the group's coverage box.

type PaintCtx source · line 5272 · raw

Data

What one shape's pixels need: the brush (a solid color is kept as a premultiplied color to scale per block), the device-to-local matrix, the color space and the enclosing clips.

type Pick source · line 5847 · raw

Data

Definitions

def length.go source · line 13 · raw

@s:String -> @acc:U32 -> U32

def length source · line 18 · raw

@s:String -> U32

def identity source · line 25 · raw

Matrix

def matrix.mul source · line 28 · raw

@+m:Matrix -> @+n:Matrix -> Matrix

def matrix.inverse.values source · line 34 · raw

@+m:Matrix -> @+det:F32 -> Matrix

def matrix.inverse source · line 39 · raw

@+m:Matrix -> Matrix

def matrix.point source · line 46 · raw

@+m:Matrix -> @+p:Point -> Point

def translate source · line 51 · raw

@x:F32 -> @y:F32 -> Matrix

def scale source · line 54 · raw

@x:F32 -> @y:F32 -> Matrix

def rotate source · line 57 · raw

@+angle:F32 -> Matrix

def transform.one source · line 61 · raw

@+name:String -> @+v:List<&2, F32> -> Matrix

def transform.args source · line 77 · raw

@n:String -> @s:0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan -> @m:Matrix -> @next:(@_:String -> @_:Matrix -> Matrix) -> Matrix

def transform.name source · line 81 · raw

@s:0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan -> @m:Matrix -> @next:(@_:String -> @_:Matrix -> Matrix) -> Matrix

def edge.of source · line 98 · raw

@a:Point -> @b:Point -> @stroke:Bool -> @closed:Bool -> Edge

def cover.none source · line 109 · raw

Cover

def cover.present source · line 112 · raw

@+c:Cover -> Bool

def cover.at source · line 116 · raw

@+c:Cover -> @+p:Point -> F32

def point.add source · line 121 · raw

@p:Point -> @q:Point -> Point

def point.sub source · line 126 · raw

@p:Point -> @q:Point -> Point

def point.scale source · line 131 · raw

@p:Point -> @+s:F32 -> Point

def point.dot source · line 135 · raw

@p:Point -> @q:Point -> F32

def point.mid source · line 140 · raw

@p:Point -> @q:Point -> Point

def point.distance source · line 143 · raw

@+p:Point -> @+q:Point -> F32

def flat.tolerance source · line 150 · raw

F32

Curves are flattened to a tolerance measured in device pixels (converted to local units through the element's matrix by the caller), so a curve gets as many segments as the output size needs and no more.

def matrix.norm source · line 155 · raw

@+m:Matrix -> F32

The largest scale the matrix applies to any direction, bounded by its Frobenius norm; local tolerance = pixel tolerance / scale.

def local.tolerance source · line 161 · raw

@+m:Matrix -> @+scale:F32 -> F32

scale is the device pixels per unit of the frame m maps into (1 when m maps to the device, the tile's density for pattern content).

def chord.cross source · line 164 · raw

@p:Point -> @q:Point -> F32

def chord.near source · line 171 · raw

@+p:Point -> @+q:Point -> @+x:Point -> @+tol:F32 -> Bool

Whether x lies within tol of the chord pq: at most tol from its line and not beyond either end by more than tol.

def cubic.flat source · line 183 · raw

@+p:Point -> @+a:Point -> @+b:Point -> @+q:Point -> @+tol:F32 -> Bool

A cubic's distance from its chord is 3t(1-t) times a mix of its control points' distances, at most three quarters of the larger, so the curve is within tol when both control points are within 4/3 tol.

def cubic.count source · line 192 · raw

@+p:Point -> @+a:Point -> @+b:Point -> @+q:Point -> @+tol:F32 -> U32

Wang's bound: a cubic cut into n equal parameter steps stays within e of its chords when n >= sqrt(3/4 * L / e), L the larger second difference of the control points. The bound assumes the curvature all sits in one place, so the tolerance is doubled to land near the adaptive count; the count is fixed up front and each point costs one evaluation and no flatness test.

def cubic.at source · line 196 · raw

@+p:Point -> @+a:Point -> @+b:Point -> @+q:Point -> @+t:F32 -> Point

def cubic source · line 209 · raw

@+p:Point -> @+a:Point -> @+b:Point -> @+q:Point -> @+edges:List<&2, Edge> -> @+tol:F32 -> List<&2, Edge>

def path.letter source · line 222 · raw

@+ch:U32 -> Bool

def path.next source · line 225 · raw

@s:String -> @+cmd:U32 -> PathNext

def floats.rev source · line 232 · raw

@xs:List<&2, F32> -> @acc:List<&2, F32> -> List<&2, F32>

def arc.flag source · line 237 · raw

@+s:String -> 0xaff2b2d0565125a37b5df94a39451ef8/scan.Number

def args.number.pick source · line 242 · raw

@flag:Bool -> @s:String -> 0xaff2b2d0565125a37b5df94a39451ef8/scan.Number

def args.number source · line 248 · raw

@+n:Nat -> @s:String -> @+arc:Bool -> 0xaff2b2d0565125a37b5df94a39451ef8/scan.Number

The arguments are counted down; an arc's flags are the 4th and 3rd from its end.

def path.arguments source · line 264 · raw

@+n:Nat -> @s:String -> @+arc:Bool -> @+cmd:U32 -> Params

def marker.segment source · line 273 · raw

@trace:Maybe<&2, List<&2, MarkerSegment>> -> @segment:MarkerSegment -> Maybe<&2, List<&2, MarkerSegment>>

def marker.nonzero source · line 278 · raw

@+v:Point -> Bool

def marker.vector source · line 281 · raw

@+a:Point -> @b:Point -> Point

def marker.cubic source · line 284 · raw

@+p:Point -> @+a:Point -> @+b:Point -> @+q:Point -> MarkerSegment

def marker.line source · line 288 · raw

@+p:Point -> @+q:Point -> @kind:U32 -> MarkerSegment

def marker.arc.tangent source · line 291 · raw

@+rx:F32 -> @+ry:F32 -> @+phi:F32 -> @+theta:F32 -> @+delta:F32 -> Point

def upper source · line 299 · raw

@+c:U32 -> U32

def relative source · line 302 · raw

@+cmd:U32 -> @+current:Point -> @p:Point -> Point

def path.move source · line 305 · raw

@+p:Path -> @+q:Point -> @cmd:U32 -> Path

def path.line source · line 310 · raw

@+p:Path -> @+q:Point -> @+cmd:U32 -> Path

def path.cubic source · line 314 · raw

@+p:Path -> @+a:Point -> @+b:Point -> @+q:Point -> @+cmd:U32 -> Path

def path.quad source · line 319 · raw

@+p:Path -> @+a:Point -> @+q:Point -> @+cmd:U32 -> Path

def path.close source · line 326 · raw

@+p:Path -> Path

def path.h source · line 330 · raw

@+cur:Point -> @+v:F32 -> @cmd:U32 -> Point

def path.v source · line 334 · raw

@+cur:Point -> @+v:F32 -> @cmd:U32 -> Point

def arc.point source · line 339 · raw

@+center:Point -> @+rx:F32 -> @+ry:F32 -> @+phi:F32 -> @+t:F32 -> Point

Endpoint-to-center conversion from SVG's elliptical arc implementation notes.

def arc.edges source · line 343 · raw

@+n:Nat -> @+i:F32 -> @+step:F32 -> @+theta:F32 -> @+center:Point -> @+rx:F32 -> @+ry:F32 -> @+phi:F32 -> @+endpoint:Point -> @p:Point -> @edges:List<&2, Edge> -> List<&2, Edge>

def arc.draw source · line 351 · raw

@+p:Path -> @+q:Point -> @+cmd:U32 -> @+rx:F32 -> @+ry:F32 -> @+phi:F32 -> @+center:Point -> @+theta:F32 -> @+delta:F32 -> Path

def arc.angles source · line 362 · raw

@+p:Path -> @+q:Point -> @+cmd:U32 -> @+rx:F32 -> @+ry:F32 -> @+phi:F32 -> @+xp:F32 -> @+yp:F32 -> @+cx:F32 -> @+cy:F32 -> @+center:Point -> @sweep:F32 -> Path

def arc.center source · line 374 · raw

@+p:Path -> @+q:Point -> @+cmd:U32 -> @+rx:F32 -> @+ry:F32 -> @+phi:F32 -> @+xp:F32 -> @+yp:F32 -> @+coef:F32 -> @sweep:F32 -> Path

def arc.radii source · line 383 · raw

@+p:Path -> @+q:Point -> @+cmd:U32 -> @+rx:F32 -> @+ry:F32 -> @+phi:F32 -> @+xp:F32 -> @+yp:F32 -> @+large:F32 -> @+sweep:F32 -> Path

def arc.prepare source · line 393 · raw

@+p:Path -> @+q:Point -> @cmd:U32 -> @rx:F32 -> @ry:F32 -> @+phi:F32 -> @large:F32 -> @sweep:F32 -> @delta:Point -> Path

def path.arc source · line 401 · raw

@+p:Path -> @+q:Point -> @+cmd:U32 -> @+rx:F32 -> @+ry:F32 -> @phi:F32 -> @large:F32 -> @sweep:F32 -> Path

def path.cursor source · line 411 · raw

@p:Path -> Point

The command's numbers are read by pattern, exactly as many as it takes; the parser has already counted them.

def path.smooth source · line 417 · raw

@p:Path -> @+a:U32 -> @+b:U32 -> Point

The reflected control point of a smooth curve after a curve of the same kind (commands a or b), else the current point.

def path.apply source · line 423 · raw

@+p:Path -> @+cmd:U32 -> @c:U32 -> @vs:List<&2, F32> -> Path

def path.arity source · line 472 · raw

@+c:U32 -> Nat

def path.step source · line 480 · raw

@kind:U32 -> @p:Path -> @+cmd:U32 -> @vs:List<&2, F32> -> Path

A command applied to the path: 0 nothing (before the first command), 1 a close, 2 a drawing command with its numbers.

def path.follow source · line 488 · raw

@+cmd:U32 -> U32

The command a bare number after cmd repeats: a move continues as a line, a close as nothing (the parse ends), any other command as itself.

def path.step.kind source · line 491 · raw

@+cmd:U32 -> U32

def path.loop source · line 516 · raw

@s:String -> @p:Path -> Path

def path.finish source · line 519 · raw

@+p:Path -> List<&2, Edge>

def path source · line 523 · raw

@s:String -> @+tol:F32 -> List<&2, Edge>

def edge.cross source · line 527 · raw

@+edge:Edge -> @+p:Point -> F32

Geometry queries use half-open crossings, supporting both SVG fill rules.

def winding source · line 534 · raw

@edges:List<&2, Edge> -> @+p:Point -> F32

def fill.inside source · line 539 · raw

@edges:List<&2, Edge> -> @p:Point -> @even:Bool -> Bool

def edge.distance source · line 543 · raw

@+e:Edge -> @+p:Point -> F32

def stroke.inside source · line 551 · raw

@edges:List<&2, Edge> -> @+p:Point -> @+radius:F32 -> Bool

def bounds.point source · line 561 · raw

@+b:Bounds -> @+p:Point -> Bounds

def bounds.at source · line 566 · raw

@+b:Bounds -> @+x:F32 -> @+y:F32 -> Bounds

def bounds source · line 570 · raw

@edges:List<&2, Edge> -> @box:Bounds -> Bounds

def bounds.inside source · line 575 · raw

@b:Bounds -> @+p:Point -> @+margin:F32 -> Bool

def inflate source · line 581 · raw

@+data:0xb4c178c822e0e37d625a581d728097d3/bytes.Bytes -> @limit:U32 -> 0xb4c178c822e0e37d625a581d728097d3/bytes.Inflate

def color.fade source · line 584 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+opacity:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.over source · line 588 · raw

@+front:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @back:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.add source · line 594 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @d:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def byte source · line 599 · raw

@+x:U32 -> @n:U32 -> F32

def color.rgb source · line 605 · raw

@+x:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def nibble source · line 608 · raw

@+x:U32 -> @n:U32 -> F32

def color.hex.short source · line 611 · raw

@+x:U32 -> @len:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.hex source · line 615 · raw

@+x:U32 -> @+len:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.named.a source · line 620 · raw

@+s:String -> U32

def color.named.b source · line 623 · raw

@+s:String -> U32

def color.named.c source · line 626 · raw

@+s:String -> U32

def color.named.d source · line 629 · raw

@+s:String -> U32

def color.named.f source · line 632 · raw

@+s:String -> U32

def color.named.g source · line 635 · raw

@+s:String -> U32

def color.named.h source · line 638 · raw

@+s:String -> U32

def color.named.i source · line 641 · raw

@+s:String -> U32

def color.named.k source · line 644 · raw

@+s:String -> U32

def color.named.l source · line 647 · raw

@+s:String -> U32

def color.named.m source · line 650 · raw

@+s:String -> U32

def color.named.n source · line 653 · raw

@+s:String -> U32

def color.named.o source · line 656 · raw

@+s:String -> U32

def color.named.p source · line 659 · raw

@+s:String -> U32

def color.named.r source · line 662 · raw

@+s:String -> U32

def color.named.s source · line 665 · raw

@+s:String -> U32

def color.named.t source · line 668 · raw

@+s:String -> U32

def color.named.v source · line 671 · raw

@+s:String -> U32

def color.named.w source · line 674 · raw

@+s:String -> U32

def color.named.y source · line 677 · raw

@+s:String -> U32

def color.named.code source · line 680 · raw

@+s:String -> U32

def color.named source · line 683 · raw

@s:String -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.word source · line 692 · raw

@+s:String -> @+acc:String -> 0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan

def color.token.number source · line 699 · raw

@num:0xaff2b2d0565125a37b5df94a39451ef8/scan.Number -> @sep:U32 -> ColorToken

def color.token source · line 706 · raw

@+word:String -> @+sep:U32 -> ColorToken

def color.tokens.word source · line 709 · raw

@+scan:0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan -> @next:(@_:String -> List<&2, ColorToken>) -> List<&2, ColorToken>

def color.tokens source · line 721 · raw

@fuel:Nat -> @s:String -> List<&2, ColorToken>

def color.component source · line 726 · raw

@+kind:U32 -> Bool

def color.hue source · line 729 · raw

@+x:F32 -> @+kind:U32 -> F32

def color.hsl.channel source · line 733 · raw

@+h:F32 -> @+s:F32 -> @+l:F32 -> @n:F32 -> F32

def color.hsl source · line 738 · raw

@+h:F32 -> @+s:F32 -> @+l:F32 -> @a:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.hwb.mix source · line 743 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+white:F32 -> @+black:F32 -> @alpha:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.hwb source · line 748 · raw

@h:F32 -> @+w:F32 -> @+b:F32 -> @+a:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.function.channels source · line 755 · raw

@+r:ColorToken -> @+g:ColorToken -> @+b:ColorToken -> @+a:ColorToken -> @+mode:U32 -> @+alpha:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.function.args source · line 774 · raw

@xs:List<&2, ColorToken> -> @mode:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.hex.valid source · line 780 · raw

@s:String -> Bool

def color.hex.string source · line 787 · raw

@+s:String -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.parse source · line 792 · raw

@+s:String -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.hex.digit source · line 801 · raw

@+ch:U32 -> Bool

Hex digits after a '#', read in one pass: the value and count when the rest is only whitespace, else a count of 0 so the general parser decides.

def color.hex.start source · line 817 · raw

@rest:String -> Pair(U32, U32)

def color.hex.fast source · line 824 · raw

@scanned:Pair(U32, U32) -> @s:String -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.head source · line 830 · raw

@+s:String -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color source · line 839 · raw

@s:String -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.opacity.number source · line 842 · raw

@num:0xaff2b2d0565125a37b5df94a39451ef8/scan.Number -> @fallback:F32 -> F32

def color.opacity source · line 847 · raw

@s:String -> @fallback:F32 -> F32

def dimension source · line 850 · raw

@attrs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @key:String -> @ref:F32 -> @fallback:String -> F32

def xy source · line 853 · raw

@x:F32 -> @y:F32 -> String

def shape.rect.path source · line 856 · raw

@+x:F32 -> @+y:F32 -> @+w:F32 -> @+h:F32 -> @+rx:F32 -> @+ry:F32 -> String

def shape.rect source · line 864 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+vw:F32 -> @+vh:F32 -> String

def shape.ellipse.path source · line 872 · raw

@+x:F32 -> @+y:F32 -> @+rx:F32 -> @+ry:F32 -> String

def edges.transform source · line 877 · raw

@es:List<&2, Edge> -> @+m:Matrix -> List<&2, Edge>

def shape.data source · line 885 · raw

@+name:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+vw:F32 -> @+vh:F32 -> @data:String -> String

The path data of a shape; a path's own d arrives separately (taken out of its attributes) so the parser owns that text outright.

def glyph.path source · line 902 · raw

@+d:String -> @+gm:Matrix -> @+tol:F32 -> List<&2, Edge>

def shape.of source · line 905 · raw

@glyph:Bool -> @data:String -> @+name:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+vw:F32 -> @+vh:F32 -> @+tol:F32 -> List<&2, Edge>

def shape source · line 910 · raw

@+name:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+vw:F32 -> @+vh:F32 -> @+tol:F32 -> @data:String -> List<&2, Edge>

def glyph.edges.append source · line 915 · raw

@xs:List<&2, Edge> -> @ys:List<&2, Edge> -> List<&2, Edge>

Paint adjacent glyphs with one shared style as one geometry. This keeps all fills together and all strokes together, including overlapping glyphs.

def glyph.edges source · line 920 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+tol:F32 -> List<&2, Edge>

def shape.children source · line 928 · raw

@+name:String -> @as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @kids:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @vw:F32 -> @vh:F32 -> @+tol:F32 -> @data:String -> List<&2, Edge>

The element's edges in local units, flattened for the local-to-device matrix m.

def marker.segments.reverse source · line 934 · raw

@xs:List<&2, MarkerSegment> -> @acc:List<&2, MarkerSegment> -> List<&2, MarkerSegment>

def marker.subpaths.reverse source · line 939 · raw

@xs:List<&2, MarkerSubpath> -> @acc:List<&2, MarkerSubpath> -> List<&2, MarkerSubpath>

def marker.subpaths source · line 944 · raw

@+xs:List<&2, MarkerSegment> -> @+start:Point -> @+acc:List<&2, MarkerSegment> -> @+have:Bool -> @+done:List<&2, MarkerSubpath> -> List<&2, MarkerSubpath>

def marker.first source · line 956 · raw

@xs:List<&2, MarkerSegment> -> @fallback:Point -> Point

def marker.last source · line 963 · raw

@xs:List<&2, MarkerSegment> -> @fallback:Point -> Point

def marker.angle.vector source · line 969 · raw

@v:Point -> F32

def marker.angle.mean source · line 973 · raw

@+a:F32 -> @+b:F32 -> F32

def marker.direction source · line 977 · raw

@+incoming:Point -> @+outgoing:Point -> F32

def marker.vertices.one source · line 993 · raw

@+subpath:MarkerSubpath -> List<&2, MarkerVertex>

def marker.vertices.append source · line 1003 · raw

@xs:List<&2, MarkerVertex> -> @ys:List<&2, MarkerVertex> -> List<&2, MarkerVertex>

def marker.vertices source · line 1008 · raw

@xs:List<&2, MarkerSubpath> -> List<&2, MarkerVertex>

def marker.trace.result source · line 1013 · raw

@trace:Maybe<&2, List<&2, MarkerSegment>> -> List<&2, MarkerVertex>

def marker.trace.path source · line 1018 · raw

@p:Path -> List<&2, MarkerVertex>

def marker.trace source · line 1022 · raw

@s:String -> List<&2, MarkerVertex>

def stroke.settings source · line 1030 · raw

StrokeSettings

def keyword.blank source · line 1039 · raw

@s:String -> Bool

A property from an element's attributes: absent means the inherited value (or the initial one for non-inherited properties) with no string work at all; present, the CSS-wide keywords are honoured. The CSS-wide keywords of a value: 1 inherit, 2 initial, 3 unset, 0 none. Decided from the first letter on, case-insensitively, with blanks around allowed, without lowercasing or trimming a copy of every value.

def keyword.rest source · line 1044 · raw

@p:String -> @s:String -> Bool

def keyword.pick source · line 1052 · raw

@+s:String -> U32

def keyword.head source · line 1055 · raw

@s:String -> U32

def style.keyword source · line 1062 · raw

@s:String -> U32

def style.present source · line 1065 · raw

@found:Maybe<&2, String> -> @+fallback:String -> @+initial:String -> @+inherited:Bool -> String

def style.value source · line 1074 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @key:String -> @+fallback:String -> @+initial:String -> @+inherited:Bool -> String

def style.number.present source · line 1079 · raw

@found:Maybe<&2, String> -> @+parent:F32 -> @+initial:F32 -> @parse:(@_:String -> F32) -> F32

A numeric inherited property: the parent's number stays a number when the attribute is absent instead of being printed and parsed again.

def style.number source · line 1088 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @key:String -> @+parent:F32 -> @+initial:F32 -> @parse:(@_:String -> F32) -> F32

def pick.none source · line 1101 · raw

Picked

def pick.first source · line 1104 · raw

@old:Maybe<&2, String> -> @v:String -> Maybe<&2, String>

def pick.slot.f source · line 1110 · raw

@+k:String -> U32

Which property a key names, 0 for none, by its first letter then the name.

def pick.slot.s source · line 1113 · raw

@+k:String -> U32

def pick.slot.m source · line 1118 · raw

@+k:String -> U32

def pick.slot.other source · line 1121 · raw

@+k:String -> @+c:U32 -> U32

def pick.slot source · line 1126 · raw

@k:String -> U32

def pick.put source · line 1134 · raw

@p:Picked -> @+slot:U32 -> @v:String -> Picked

def style.pick source · line 1158 · raw

@as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @p:Picked -> Picked

def stroke.inherit source · line 1163 · raw

@s:StrokeSettings -> @cap:Maybe<&2, String> -> @join:Maybe<&2, String> -> @lim:Maybe<&2, String> -> @dash:Maybe<&2, String> -> @offset:Maybe<&2, String> -> @vector:Maybe<&2, String> -> StrokeSettings

def point.cross source · line 1171 · raw

@p:Point -> @q:Point -> F32

def point.normal source · line 1176 · raw

@p:Point -> Point

def point.unit source · line 1180 · raw

@+p:Point -> Point

def points.rev source · line 1186 · raw

@xs:List<&2, Point> -> @acc:List<&2, Point> -> List<&2, Point>

def points.clean source · line 1209 · raw

@xs:List<&2, Point> -> @+previous:Point -> List<&2, Point>

def subpath.finish source · line 1216 · raw

@points:List<&2, Point> -> @closed:Bool -> @paths:List<&2, Subpath> -> List<&2, Subpath>

def edges.rev source · line 1223 · raw

@es:List<&2, Edge> -> @acc:List<&2, Edge> -> List<&2, Edge>

def points.add source · line 1228 · raw

@points:List<&2, Point> -> @a:Point -> @b:Point -> List<&2, Point>

def edge.kind source · line 1240 · raw

@+stroked:Bool -> @+closed:Bool -> U32

0 a fill-only edge (ends the current subpath, open), 1 a stroked edge (extends it), 2 a closing edge (ends it, closed).

def subpaths.add source · line 1243 · raw

@kind:U32 -> @+ax:F32 -> @+ay:F32 -> @+bx:F32 -> @+by:F32 -> @st:Sub -> Sub

def subpaths.finish source · line 1255 · raw

@st:Sub -> List<&2, Subpath>

def subpaths source · line 1265 · raw

@es:List<&2, Edge> -> List<&2, Subpath>

def segment.of source · line 1273 · raw

@p:Point -> @q:Point -> @u:Point -> @+length:F32 -> @+distance:F32 -> Segment

def segments source · line 1279 · raw

@+points:List<&2, Point> -> @+distance:F32 -> List<&2, Segment>

def segments.length source · line 1287 · raw

@xs:List<&2, Segment> -> F32

def floats.append source · line 1303 · raw

@xs:List<&2, F32> -> @ys:List<&2, F32> -> List<&2, F32>

def floats.count source · line 1308 · raw

@xs:List<&2, F32> -> U32

def floats.sum source · line 1313 · raw

@xs:List<&2, F32> -> F32

def floats.negative source · line 1318 · raw

@xs:List<&2, F32> -> Bool

def dash.skip.units source · line 1323 · raw

@+s:String -> String

def dash.value source · line 1330 · raw

@+n:0xaff2b2d0565125a37b5df94a39451ef8/scan.Number -> @ref:F32 -> @next:(@_:String -> List<&2, F32>) -> List<&2, F32>

def dash.pattern.values source · line 1338 · raw

@+values:List<&2, F32> -> @offset:F32 -> DashPattern

def floats.scale source · line 1342 · raw

@xs:List<&2, F32> -> @+factor:F32 -> List<&2, F32>

def dash.pattern source · line 1347 · raw

@settings:StrokeSettings -> @+ref:F32 -> @+factor:F32 -> DashPattern

def dash.some source · line 1352 · raw

@pattern:DashPattern -> Bool

Whether the pattern dashes at all.

def dash.seek source · line 1356 · raw

@xs:List<&2, F32> -> @+offset:F32 -> @+painted:Bool -> DashCursor

def dash.next source · line 1365 · raw

@xs:List<&2, F32> -> @all:List<&2, F32> -> @painted:Bool -> DashCursor

def dash.runs source · line 1378 · raw

@+pattern:DashPattern -> @+total:F32 -> List<&2, DashRun>

def dash.crosses source · line 1383 · raw

@xs:List<&2, DashRun> -> @+t:F32 -> Bool

def dash.start source · line 1389 · raw

@xs:List<&2, DashRun> -> Bool

def dash.end source · line 1395 · raw

@xs:List<&2, DashRun> -> @+total:F32 -> Bool

def segment.dir source · line 1401 · raw

@s:Segment -> Point

def segment.start source · line 1405 · raw

@s:Segment -> Point

def segment.end source · line 1409 · raw

@s:Segment -> Point

def cap.code source · line 1429 · raw

@+s:String -> U32

def join.code source · line 1432 · raw

@+s:String -> U32

def joins.of source · line 1435 · raw

@settings:StrokeSettings -> Joins

def outline.tolerance source · line 1439 · raw

@+scale:F32 -> F32

def outline.steps source · line 1443 · raw

@+sweep:F32 -> @+r:F32 -> @+scale:F32 -> U32

Steps for an arc of sweep radians at radius r within the tolerance.

def point.angle source · line 1448 · raw

@+p:Point -> F32

def outline.arc source · line 1453 · raw

@n:Nat -> @+c:Point -> @+r:F32 -> @+angle:F32 -> @+step:F32 -> @acc:List<&2, Point> -> List<&2, Point>

n points from angle on, step apart, prepended in order.

def outline.sweep source · line 1460 · raw

@+c:Point -> @+r:F32 -> @+from:Point -> @+sweep:F32 -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

The points strictly between the start and end of an arc around c from the direction from sweeping sweep radians (signed).

def point.turn source · line 1466 · raw

@+u:Point -> @+v:Point -> F32

The signed angle from u to v, both unit vectors.

def outline.miter.pick source · line 1473 · raw

@fits:Bool -> @clip:Bool -> @+m:Point -> @+a:Point -> @+b:Point -> @+da:F32 -> @+db:F32 -> @+distance:F32 -> @+reach:F32 -> @acc:List<&2, Point> -> List<&2, Point>

The join on the left side at vertex p, from the incoming direction u to the outgoing v, when that side is the outer one (the path turns right). Both offset endpoints a = p + r n(u) and b = p + r n(v) are pushed by the segments; only what lies between them is added here.

def outline.miter source · line 1483 · raw

@+p:Point -> @+a:Point -> @+b:Point -> @+u:Point -> @+v:Point -> @+r:F32 -> @+limit:F32 -> @+join:U32 -> @acc:List<&2, Point> -> List<&2, Point>

def outline.join.kind source · line 1490 · raw

@+join:U32 -> @+p:Point -> @+u:Point -> @+v:Point -> @+nu:Point -> @+r:F32 -> @+limit:F32 -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

def outline.join.outer source · line 1496 · raw

@+p:Point -> @+u:Point -> @+v:Point -> @+r:F32 -> @js:Joins -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

def outline.join.back.kind source · line 1501 · raw

@join:U32 -> @+p:Point -> @+u:Point -> @+r:F32 -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

A reversal (v = -u) gets the half circle through p + r u when joins are round.

def outline.join.back source · line 1506 · raw

@+p:Point -> @+u:Point -> @+r:F32 -> @js:Joins -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

def prev.of source · line 1515 · raw

@seg:Segment -> @+r:F32 -> Prev

def outline.inner source · line 1524 · raw

@+p:Point -> @+u:Point -> @+a1:Point -> @+lenPrev:F32 -> @+v:Point -> @+b0:Point -> @+lenNext:F32 -> @+acc:List<&2, Point> -> List<&2, Point>

On the inner side the two offset lines cross; when they cross within both segments that point replaces both offset ends, so the outline has no loop there. Otherwise (a segment shorter than the offset) the ends stay and the loop they make still fills under nonzero winding.

def outline.back.if source · line 1531 · raw

@reversal:Bool -> @+p:Point -> @+u:Point -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

def outline.vertex.pick source · line 1538 · raw

@straight:Bool -> @outer:Bool -> @+p:Point -> @+u:Point -> @+a1:Point -> @+lenPrev:F32 -> @+v:Point -> @+b0:Point -> @+lenNext:F32 -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

The points at vertex p between the previous segment (direction u, offset end a1) and the next (direction v, offset start b0).

def outline.vertex.join source · line 1546 · raw

@+p:Point -> @+u:Point -> @+a1:Point -> @+lenPrev:F32 -> @+v:Point -> @+b0:Point -> @+lenNext:F32 -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

def outline.vertex source · line 1550 · raw

@previous:Maybe<&2, Prev> -> @+p:Point -> @+v:Point -> @+lenNext:F32 -> @+b0:Point -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

def outline.side.end source · line 1557 · raw

@previous:Maybe<&2, Prev> -> @closed:Bool -> @acc:List<&2, Point> -> List<&2, Point>

At the end of an open side the last offset end is emitted; a closed loop emitted it through its first vertex.

def outline.side source · line 1568 · raw

@xs:List<&2, Segment> -> @previous:Maybe<&2, Prev> -> @+closed:Bool -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

The left side of a polyline: each segment's offset endpoints with the joins between segments. previous carries the segment arriving at the first vertex (the last one, for a closed subpath).

def outline.cap source · line 1580 · raw

@cap:U32 -> @+p:Point -> @+u:Point -> @+r:F32 -> @+scale:F32 -> @acc:List<&2, Point> -> List<&2, Point>

The cap at point p leaving in direction u, between the offsets p + r n and p - r n (which the sides push): nothing for butt.

def outline.edges.go source · line 1589 · raw

@+first:Point -> @pts:List<&2, Point> -> @+prev:Point -> @acc:List<&2, Edge> -> List<&2, Edge>

def outline.edges source · line 1597 · raw

@pts:List<&2, Point> -> @acc:List<&2, Edge> -> List<&2, Edge>

The closed polygon through the points, as edges.

def segments.last source · line 1604 · raw

@xs:List<&2, Segment> -> @fallback:Segment -> Segment

def joins.cap source · line 1611 · raw

@+s:Joins -> U32

The outline of an open polyline: the left side, the end cap, the right side (the left side of the reversed points) and the start cap.

def outline.open.go source · line 1615 · raw

@forward:List<&2, Segment> -> @back:List<&2, Segment> -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

def segments.flip source · line 1629 · raw

@xs:List<&2, Segment> -> @acc:List<&2, Segment> -> List<&2, Segment>

The segments backwards, each turned around, for the right side.

def outline.open.segs source · line 1634 · raw

@+forward:List<&2, Segment> -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

def outline.open source · line 1637 · raw

@pts:List<&2, Point> -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

def outline.loop source · line 1641 · raw

@+xs:List<&2, Segment> -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

A closed subpath: one closed loop per side, each joined at the start vertex.

def outline.closed.segs source · line 1648 · raw

@+forward:List<&2, Segment> -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

def outline.closed source · line 1651 · raw

@pts:List<&2, Point> -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

def outline.dot.cap source · line 1655 · raw

@+cap:U32 -> @+p:Point -> @+u:Point -> @+r:F32 -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

A zero-length piece: a dot for round caps, a square for square caps.

def outline.dot source · line 1662 · raw

@+p:Point -> @+u:Point -> @+r:F32 -> @js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

def segment.at source · line 1667 · raw

@s:Segment -> @+d:F32 -> Point

---- dashes as polylines ---- The point at distance d along the segments, and the direction there.

def segment.reaches source · line 1671 · raw

@s:Segment -> @+d:F32 -> Bool

def points.push.if source · line 1693 · raw

@hit:Bool -> @+p:Point -> @tail:List<&2, Point> -> List<&2, Point>

def segments.between source · line 1699 · raw

@xs:List<&2, Segment> -> @+s:F32 -> @+e:F32 -> @acc:List<&2, Point> -> List<&2, Point>

The vertices strictly inside (s, e), in order, prepended before acc.

def dash.points source · line 1707 · raw

@+xs:List<&2, Segment> -> @+s:F32 -> @+e:F32 -> List<&2, Point>

The polyline of the run [s, e] along the segments.

def outline.run source · line 1710 · raw

@+xs:List<&2, Segment> -> @+s:F32 -> @+e:F32 -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @+acc:List<&2, Edge> -> List<&2, Edge>

def outline.runs source · line 1717 · raw

@runs:List<&2, DashRun> -> @+xs:List<&2, Segment> -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

The runs of an open subpath, or of a closed one whose dashes do not meet at the seam. A closed subpath painted along its whole length is a closed loop.

def dash.first.end source · line 1722 · raw

@xs:List<&2, DashRun> -> F32

def dash.last.start source · line 1727 · raw

@xs:List<&2, DashRun> -> @+fallback:F32 -> F32

def dash.drop.first source · line 1732 · raw

@xs:List<&2, DashRun> -> List<&2, DashRun>

def dash.drop.last source · line 1737 · raw

@xs:List<&2, DashRun> -> List<&2, DashRun>

def dash.whole source · line 1743 · raw

@xs:List<&2, DashRun> -> @+total:F32 -> Bool

def dash.points.tail source · line 1749 · raw

@+xs:List<&2, Segment> -> @+s:F32 -> @+e:F32 -> List<&2, Point>

def points.append source · line 1752 · raw

@xs:List<&2, Point> -> @ys:List<&2, Point> -> List<&2, Point>

def outline.seam source · line 1759 · raw

@+xs:List<&2, Segment> -> @+runs:List<&2, DashRun> -> @+total:F32 -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

The dashes of a closed subpath crossing the seam merge into one polyline: the last run's points followed by the first run's, minus the shared point.

def outline.dashed.runs source · line 1765 · raw

@+pts:List<&2, Point> -> @+closed:Bool -> @+r:F32 -> @+js:Joins -> @+pattern:DashPattern -> @+scale:F32 -> @+acc:List<&2, Edge> -> List<&2, Edge>

def outline.plain source · line 1775 · raw

@closed:Bool -> @pts:List<&2, Point> -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

An undashed subpath is outlined whole; only a dash pattern measures it.

def outline.dashed source · line 1780 · raw

@dashed:Bool -> @pts:List<&2, Point> -> @+closed:Bool -> @+r:F32 -> @+js:Joins -> @pattern:DashPattern -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

def dash.any source · line 1785 · raw

@xs:List<&2, DashRun> -> Bool

def outline.dot.if source · line 1790 · raw

@paint:Bool -> @+p:Point -> @+r:F32 -> @+js:Joins -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

def outline.subpath source · line 1797 · raw

@+pts:List<&2, Point> -> @+closed:Bool -> @+r:F32 -> @+js:Joins -> @+pattern:DashPattern -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

A subpath of one point: caps only, as a dot in the x direction, when the dash pattern paints at its start.

def outline.subpaths source · line 1803 · raw

@paths:List<&2, Subpath> -> @+r:F32 -> @+js:Joins -> @+pattern:DashPattern -> @+scale:F32 -> @acc:List<&2, Edge> -> List<&2, Edge>

def subpaths.length source · line 1808 · raw

@paths:List<&2, Subpath> -> F32

def stroke.compile.pick source · line 1813 · raw

@measured:Bool -> @paths:List<&2, Subpath> -> @r:F32 -> @+settings:StrokeSettings -> @ref:F32 -> @+declared:F32 -> @+scale:F32 -> List<&2, Edge>

def stroke.compile.paths source · line 1820 · raw

@paths:List<&2, Subpath> -> @r:F32 -> @+settings:StrokeSettings -> @ref:F32 -> @+declared:F32 -> @+scale:F32 -> List<&2, Edge>

def stroke.compile source · line 1824 · raw

@es:List<&2, Edge> -> @r:F32 -> @settings:StrokeSettings -> @ref:F32 -> @declared:F32 -> @+scale:F32 -> List<&2, Edge>

The stroke outline edges of a shape's edges, in the same units.

def bounds.empty source · line 1827 · raw

Bounds

def bounds.merge source · line 1830 · raw

@a:Bounds -> @b:Bounds -> Bounds

def edge.tree.bounds source · line 1840 · raw

@t:EdgeTree -> Bounds

def edge.tree source · line 1844 · raw

@+es:List<&2, Edge> -> EdgeTree

def edge.tree.empty source · line 1847 · raw

EdgeTree

def bounds.ray source · line 1850 · raw

@b:Bounds -> @p:Point -> Bool

def edges.winding source · line 1856 · raw

@es:List<&2, Edge> -> @+p:Point -> @+acc:F32 -> F32

def edge.tree.winding source · line 1861 · raw

@t:EdgeTree -> @+p:Point -> F32

def edge.tree.inside source · line 1865 · raw

@t:EdgeTree -> @p:Point -> @even:Bool -> Bool

def fill.new source · line 1877 · raw

@es:List<&2, Edge> -> Fill

def fill.bounds source · line 1880 · raw

@f:Fill -> Bounds

def fill.coverage source · line 1884 · raw

@f:Fill -> @es:List<&2, Edge> -> @+q:Point -> @+p:Point -> @+even:Bool -> F32

def bounds.disk source · line 1889 · raw

@p:Point -> @+r:F32 -> Bounds

def stroke.mesh source · line 1900 · raw

@+edges:List<&2, Edge> -> @inverse:Matrix -> StrokeMesh

def stroke.mesh.inside source · line 1903 · raw

@mesh:StrokeMesh -> @p:Point -> Bool

def stroke.coverage source · line 1907 · raw

@mesh:StrokeMesh -> @+p:Point -> F32

def marker.style source · line 1915 · raw

@ms:MarkerStyle -> @s:Maybe<&2, String> -> @m:Maybe<&2, String> -> @e:Maybe<&2, String> -> MarkerStyle

def paint.order.normalize source · line 1921 · raw

@s:String -> @+out:String -> @+gap:Bool -> String

Normalize the small CSS paint-order vocabulary; omitted operations follow in default fill/stroke/markers order. Invalid values retain the inherited order.

def paint.order.name source · line 1930 · raw

@+order:U32 -> String

def paint.order.value source · line 1935 · raw

@+s:String -> @fallback:U32 -> U32

def paint.order.pick source · line 1945 · raw

@found:Maybe<&2, String> -> @+inherited:U32 -> U32

The order from an element's own attribute, else the inherited one as it is.

def style.default source · line 1958 · raw

Style

def style.inherit.picked source · line 1961 · raw

@+s:Style -> @p:Picked -> @+ref:F32 -> Style

def style.inherit source · line 1972 · raw

@+s:Style -> @as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+ref:F32 -> Style

def props.spec source · line 1982 · raw

List<&2, Prop>

def props.head.pick source · line 1991 · raw

@hit:Bool -> @+v:String -> @whole:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+key:String -> @+initial:String -> String

def props.head.value source · line 1997 · raw

@parent:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+key:String -> @+initial:String -> String

The parent's value for key: the head when the parent list is resolved, else by name.

def props.advance.pick source · line 2005 · raw

@hit:Bool -> @whole:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @rest:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def props.advance source · line 2010 · raw

@parent:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+key:String -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def props.fold source · line 2018 · raw

@spec:List<&2, Prop> -> @+parent:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def resources source · line 2031 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+root:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

Referenced elements (gradients, patterns, markers, clip paths, masks, filters) get their inherited properties on demand: the raw tree is kept under a root element whose attributes are the root svg's, and a lookup by id resolves the properties down the ancestor chain of the element it finds. Nothing is resolved for the elements a document never references.

def resources.tree source · line 2036 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+parent:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

The subtree of a found element gets its properties resolved too, since its content (stops, primitives, pattern or marker content) inherits from it.

def resource.resolve source · line 2045 · raw

@chain:List<&2, List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>> -> @own:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

The properties of an element below a chain of raw ancestor attribute lists, outermost last.

def resource.found source · line 2050 · raw

@+n:String -> @+props:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @kids:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+txt:String -> Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def resource.search source · line 2054 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+id:String -> @+chain:List<&2, List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>> -> Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

A lookup runs rarely, so it branches through lambdas over copies.

def resource.find source · line 2067 · raw

@+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+id:String -> Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def gradient.has.stops source · line 2102 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> Bool

def gradient.merge source · line 2107 · raw

@local:0x823f0d97991344accc44fe457a33356a/xml.Element -> @template:0x823f0d97991344accc44fe457a33356a/xml.Element -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def gradient.reference source · line 2113 · raw

@+node:0x823f0d97991344accc44fe457a33356a/xml.Element -> @result:Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @next:(@_:0x823f0d97991344accc44fe457a33356a/xml.Element -> 0x823f0d97991344accc44fe457a33356a/xml.Element) -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def gradient.resolve source · line 2118 · raw

@depth:Nat -> @+node:0x823f0d97991344accc44fe457a33356a/xml.Element -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def srgb.linear source · line 2127 · raw

@+v:F32 -> F32

def linear.srgb source · line 2130 · raw

@+v:F32 -> F32

def stop.color source · line 2134 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @opacity:F32 -> @+linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def property.value source · line 2143 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+parent:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+key:String -> @+initial:String -> @inherited:Bool -> String

def gradient.stops source · line 2146 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+previous:F32 -> @+linear:Bool -> List<&2, Stop>

def gradient.mix source · line 2159 · raw

@+a:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+b:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+t:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def gradient.interval source · line 2162 · raw

@xs:List<&2, Stop> -> @+previous:Stop -> @+t:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def gradient.color source · line 2175 · raw

@xs:List<&2, Stop> -> @+t:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def gradient.spread source · line 2184 · raw

@+t:F32 -> @+mode:U32 -> F32

def gradient.finish source · line 2190 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @opacity:F32 -> @+linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def radial.roots source · line 2201 · raw

@+a:F32 -> @+b:F32 -> @+c:F32 -> @+fr:F32 -> @+dr:F32 -> Parameter

def radial.parameter source · line 2209 · raw

@+p:Point -> @+start:Point -> @+end:Point -> @+r:F32 -> @+fr:F32 -> Parameter

def linear.parameter source · line 2221 · raw

@+p:Point -> @+start:Point -> @+end:Point -> Parameter

def gradient.at source · line 2227 · raw

@param:Parameter -> @stops:List<&2, Stop> -> @spread:U32 -> @opacity:F32 -> @linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def pattern.at source · line 2232 · raw

@p:Point -> @+paintPoint:Point -> @+w:F32 -> @+h:F32 -> @opacity:F32 -> @nodes:List<&2, Scene<Brush>> -> @paint:(@_:List<&2, Scene<Brush>> -> @_:Point -> @_:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

Wrap coverage and paint coordinates by the same tile, including negative tiles.

def brush.solid source · line 2240 · raw

@+c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @opacity:F32 -> Brush

def color.space source · line 2243 · raw

@+c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def raster.pixel source · line 2250 · raw

@+r:Raster -> @+x:F32 -> @+y:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.mix source · line 2255 · raw

@a:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @b:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+t:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def raster.horizontal source · line 2258 · raw

@+r:Raster -> @+x:F32 -> @+y:F32 -> @+dx:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def raster.sample source · line 2262 · raw

@+r:Raster -> @p:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.from.linear source · line 2274 · raw

@+c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def raster.color source · line 2278 · raw

@+r:Raster -> @p:Point -> @+linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def raster.image source · line 2284 · raw

@image:0x6053821c66ad4107092f3cff65679fc6/image.Picture -> Raster

def bitmap.bytes source · line 2288 · raw

@+mime:String -> @+data:String -> 0xb4c178c822e0e37d625a581d728097d3/bytes.Bytes

def bitmap.empty source · line 2291 · raw

Raster

def bitmap.uri source · line 2294 · raw

@scan:0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan -> Raster

def bitmap.decode source · line 2301 · raw

@+href:String -> Raster

def bitmap.nearest source · line 2306 · raw

@+q:F32 -> F32

Inverse F32 transforms can place an exact texel boundary a few ulps above its integer value. Snap only that rounding neighborhood before tie-breaking.

def bitmap.sample source · line 2311 · raw

@+raster:Raster -> @+p:Point -> @+center:Point -> @nearest:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def tile.wrap source · line 2322 · raw

@+q:F32 -> @+size:F32 -> F32

Pattern tiles (see cover.brush): wrap into the tile and read its raster bilinearly, wrapping at the seams so neighbouring tiles join without a border.

def tile.index source · line 2325 · raw

@+i:F32 -> @+n:U32 -> U32

def tile.corner source · line 2328 · raw

@+pixels:0x6053821c66ad4107092f3cff65679fc6/image.Pixels -> @+side:U32 -> @+x:U32 -> @+y:U32 -> @+weight:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def tile.blend source · line 2331 · raw

@+pixels:0x6053821c66ad4107092f3cff65679fc6/image.Pixels -> @+side:U32 -> @+width:U32 -> @+height:U32 -> @+fx:F32 -> @+fy:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def tile.cell source · line 2343 · raw

@+x:F32 -> @+w:F32 -> @+n:U32 -> U32

def tile.read source · line 2347 · raw

@+pixels:0x6053821c66ad4107092f3cff65679fc6/image.Pixels -> @+side:U32 -> @+wd:U32 -> @+ht:U32 -> @+w:F32 -> @+h:F32 -> @q:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

Nearest tile pixel under a pattern-space point.

def tile.sample source · line 2364 · raw

@+r:Raster -> @+q:Point -> @+w:F32 -> @+h:F32 -> @+opacity:F32 -> @+u:Point -> @+v:Point -> @+grid:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

A grid of one reads the tile bilinearly at the point (aligned tiles at device density); a larger grid averages nearest reads of a denser tile over the device pixel's footprint, the pattern-space vectors u and v.

def brush.sample source · line 2376 · raw

@brush:Brush -> @+p:Point -> @+paintPoint:Point -> @next:(@_:List<&2, Scene<Brush>> -> @_:Point -> @_:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def gradient.box source · line 2397 · raw

@b:Bounds -> Matrix

def gradient.build source · line 2403 · raw

@e:0x823f0d97991344accc44fe457a33356a/xml.Element -> @+box:Bounds -> @+w:F32 -> @+h:F32 -> @opacity:F32 -> Brush

def gradient.is.valid source · line 2424 · raw

@e:0x823f0d97991344accc44fe457a33356a/xml.Element -> Bool

def brush.resource source · line 2429 · raw

@result:Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+box:Bounds -> @+w:F32 -> @+h:F32 -> @+opacity:F32 -> @fallback:String -> @patterns:(@_:0x823f0d97991344accc44fe457a33356a/xml.Element -> @_:Bounds -> @_:F32 -> @_:F32 -> @_:F32 -> Brush) -> Brush

def brush.url source · line 2440 · raw

@+scan:0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @box:Bounds -> @w:F32 -> @h:F32 -> @opacity:F32 -> @patterns:(@_:0x823f0d97991344accc44fe457a33356a/xml.Element -> @_:Bounds -> @_:F32 -> @_:F32 -> @_:F32 -> Brush) -> Brush

def paint.keyword.head source · line 2447 · raw

@s:String -> U32

A paint's keyword, decided from its first letter: 1 currentcolor, 2 context-fill, 3 context-stroke, 0 a color or none.

def paint.keyword source · line 2455 · raw

@s:String -> U32

def brush.keyword source · line 2458 · raw

@+k:U32 -> @+s:String -> @current:String -> @+opacity:F32 -> Brush

def brush source · line 2462 · raw

@+s:String -> @current:String -> @+opacity:F32 -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @box:Bounds -> @w:F32 -> @h:F32 -> @patterns:(@_:0x823f0d97991344accc44fe457a33356a/xml.Element -> @_:Bounds -> @_:F32 -> @_:F32 -> @_:F32 -> Brush) -> Brush

def style.colors source · line 2466 · raw

@+s:Style -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+box:Bounds -> @+w:F32 -> @+h:F32 -> @fills:(@_:0x823f0d97991344accc44fe457a33356a/xml.Element -> @_:Bounds -> @_:F32 -> @_:F32 -> @_:F32 -> Brush) -> @strokes:(@_:0x823f0d97991344accc44fe457a33356a/xml.Element -> @_:Bounds -> @_:F32 -> @_:F32 -> @_:F32 -> Brush) -> Paint<Brush>

def clip.inside source · line 2471 · raw

@c:Clip -> @+p:Point -> Bool

Clip paths combine geometry by union; nested clip paths intersect coverage.

def clip.cover source · line 2479 · raw

@c:Clip -> @+p:Point -> F32

Clip coverage: unions add as independent areas, intersections multiply.

def clip.fade source · line 2491 · raw

@+cov:F32 -> @render:(@_:Unit -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def clip.empty source · line 2494 · raw

Clip

def clip.reference source · line 2497 · raw

@result:Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+box:Bounds -> @+m:Matrix -> @build:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> Clip) -> Clip

def clip.attach source · line 2509 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @box:Bounds -> @m:Matrix -> @build:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> Clip) -> Clip

def clip.compile source · line 2539 · raw

@as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @box:Bounds -> @m:Matrix -> @+w:F32 -> @+h:F32 -> @+scale:F32 -> Clip

def style.nonScaling source · line 2542 · raw

@s:Style -> Bool

def style.outline source · line 2547 · raw

@+s:Style -> @+es:List<&2, Edge> -> @+m:Matrix -> @ref:F32 -> @declared:F32 -> StrokeMesh

def bounds.transformed source · line 2554 · raw

@es:List<&2, Edge> -> @+m:Matrix -> @box:Bounds -> Bounds

def bounds.finite source · line 2562 · raw

@b:Bounds -> Bool

These bounds enclose rendered coverage, including descendant strokes and markers. They are distinct from objectBoundingBox paint coordinates.

def bounds.safe source · line 2566 · raw

@+box:Bounds -> Bounds

def bounds.transform source · line 2569 · raw

@box:Bounds -> @+mat:Matrix -> Bounds

def scene.bounds source · line 2585 · raw

@xs:List<&2, Scene<Brush>> -> @+parentInverse:Matrix -> @box:Bounds -> Bounds

A child's box already holds its own children, so the parent's box is the union of the children's boxes brought into its space.

def bounds.spec source · line 2591 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @box:Bounds -> Bounds

def filter.dimension source · line 2596 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+key:String -> @+ref:F32 -> @+fallback:String -> @user:Bool -> F32

def filter.region source · line 2599 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @box:Bounds -> @+w:F32 -> @+h:F32 -> @+primitiveBox:Bool -> Bounds

def filter.resource source · line 2616 · raw

@result:Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+box:Bounds -> @m:Matrix -> @+w:F32 -> @+h:F32 -> FilterEffect

def filter.spec source · line 2624 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @box:Bounds -> @m:Matrix -> @w:F32 -> @h:F32 -> FilterEffect

def scene.make source · line 2629 · raw

@+es:List<&2, Edge> -> @+m:Matrix -> @+s:Style -> @opacity:F32 -> @+children:List<&2, Scene<Brush>> -> @id:String -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+w:F32 -> @+h:F32 -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @fills:(@_:0x823f0d97991344accc44fe457a33356a/xml.Element -> @_:Bounds -> @_:F32 -> @_:F32 -> @_:F32 -> Brush) -> @strokes:(@_:0x823f0d97991344accc44fe457a33356a/xml.Element -> @_:Bounds -> @_:F32 -> @_:F32 -> @_:F32 -> Brush) -> @+scale:F32 -> Scene<Brush>

def viewbox.matrix source · line 2636 · raw

@+v:List<&2, F32> -> @+w:F32 -> @+h:F32 -> @+aspect:String -> Matrix

SVG viewports establish local units and intersect their children with overflow clips.

def bitmap.layout source · line 2655 · raw

@+raster:Raster -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+vw:F32 -> @+vh:F32 -> EmbeddedImage

def style.image.rendering source · line 2672 · raw

@s:Style -> String

def bitmap.element source · line 2676 · raw

@+name:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @w:F32 -> @h:F32 -> EmbeddedImage

def bitmap.attrs source · line 2679 · raw

@image:EmbeddedImage -> @fallback:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def style.image source · line 2684 · raw

@s:Style -> Style

def bitmap.style source · line 2688 · raw

@image:EmbeddedImage -> @style:Style -> Style

def style.is.visible source · line 2693 · raw

@s:Style -> Bool

def style.embedded source · line 2697 · raw

@s:Style -> Style

def bitmap.paint source · line 2701 · raw

@image:EmbeddedImage -> @ink:Paint<Brush> -> Paint<Brush>

def scene.bitmap source · line 2706 · raw

@scene:Scene<Brush> -> @image:EmbeddedImage -> Scene<Brush>

def viewport.clip source · line 2713 · raw

@+w:F32 -> @+h:F32 -> @m:Matrix -> Clip

def viewport.dimension source · line 2716 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @key:String -> @+ref:F32 -> F32

def image.layout.sized source · line 2720 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+values:List<&2, F32> -> @+vw:F32 -> @+vh:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def image.layout.attrs source · line 2732 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def element.viewport source · line 2736 · raw

@+name:String -> @raw:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+m:Matrix -> @+w:F32 -> @+h:F32 -> @+root:Bool -> Viewport

def scene.clipped source · line 2754 · raw

@scene:Scene<Brush> -> @viewportClip:Clip -> Scene<Brush>

def element.hidden source · line 2758 · raw

@+name:String -> @as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> Bool

def instance.anonymous source · line 2765 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def instance.root source · line 2771 · raw

@result:Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+useAttrs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def use.children source · line 2785 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @ancestors:List<&2, String> -> @expand:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>) -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def scenes.append source · line 2805 · raw

@xs:List<&2, Scene<Brush>> -> @ys:List<&2, Scene<Brush>> -> List<&2, Scene<Brush>>

def mask.scene source · line 2814 · raw

@scene:Scene<Brush> -> @data:MaskData -> Scene<Brush>

def mask.clip source · line 2819 · raw

@nodes:List<&2, Scene<Brush>> -> @+region:Clip -> List<&2, Scene<Brush>>

def mask.region source · line 2824 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+box:Bounds -> @+m:Matrix -> @+w:F32 -> @+h:F32 -> Clip

def mask.resource source · line 2834 · raw

@result:Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+id:String -> @+mode:String -> @+box:Bounds -> @+m:Matrix -> @+w:F32 -> @+h:F32 -> @build:(@_:String -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> MaskData

def mask.attach source · line 2847 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @active:List<&2, String> -> @box:Bounds -> @m:Matrix -> @w:F32 -> @h:F32 -> @build:(@_:String -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> MaskData

def scene.masked source · line 2856 · raw

@+scene:Scene<Brush> -> @as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @active:List<&2, String> -> @w:F32 -> @h:F32 -> @build:(@_:String -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> Scene<Brush>

def mask.value source · line 2861 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @mode:U32 -> F32

def mask.factor source · line 2865 · raw

@+mode:U32 -> @render:(@_:Unit -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> F32

def mask.apply source · line 2869 · raw

@+c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+opacity:F32 -> @mode:U32 -> @render:(@_:Unit -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

Transparent source pixels cannot contribute, so avoid rendering their masks.

def style.paint source · line 2874 · raw

@s:String -> @+current:String -> @opacity:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.sample source · line 2878 · raw

@effect:FilterEffect -> @p:Point -> @linear:Bool -> @original:(@_:Unit -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def paint.order.composite source · line 2884 · raw

@+order:U32 -> @+fill:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+stroke:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+markers:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def scene.shape source · line 2894 · raw

@f:Fill -> @es:List<&2, Edge> -> @+s:Style -> @ink:Paint<Brush> -> @outline:StrokeMesh -> @+p:Point -> @+paintPoint:Point -> @+worldPoint:Point -> @+linear:Bool -> @markers:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @fills:(@_:List<&2, Scene<Brush>> -> @_:Point -> @_:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> @strokes:(@_:List<&2, Scene<Brush>> -> @_:Point -> @_:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> @+limit:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

limit is the coverage the enclosing clips leave at this pixel; taking the minimum with the shape's own coverage keeps an edge that coincides with a clip edge (marker and image viewports) at its true coverage instead of squaring it.

def style.margin source · line 2903 · raw

@s:Style -> F32

def scene.local source · line 2908 · raw

@+scene:Scene<Brush> -> @+p:Point -> @paintPoint:Point -> @linear:Bool -> @+markers:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @fills:(@_:List<&2, Scene<Brush>> -> @_:Point -> @_:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> @strokes:(@_:List<&2, Scene<Brush>> -> @_:Point -> @_:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color) -> @+limit:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.rendered source · line 2915 · raw

@effect:FilterEffect -> Bool

A rendered filter carries its clip as a plain factor; otherwise the clip coverage travels down as the limit.

def pattern.has.content source · line 2937 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> Bool

Patterns compile their content once and reuse it for every tile sample.

def pattern.attributes source · line 2944 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def pattern.merge source · line 2954 · raw

@local:0x823f0d97991344accc44fe457a33356a/xml.Element -> @template:0x823f0d97991344accc44fe457a33356a/xml.Element -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def pattern.reference source · line 2960 · raw

@+node:0x823f0d97991344accc44fe457a33356a/xml.Element -> @result:Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @next:(@_:0x823f0d97991344accc44fe457a33356a/xml.Element -> 0x823f0d97991344accc44fe457a33356a/xml.Element) -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def pattern.resolve source · line 2967 · raw

@depth:Nat -> @+node:0x823f0d97991344accc44fe457a33356a/xml.Element -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def pattern.paint source · line 2976 · raw

@+nodes:List<&2, Scene<Brush>> -> @inv:Matrix -> @width:F32 -> @height:F32 -> @opacity:F32 -> Brush

def pattern.frame source · line 2982 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+units:Matrix -> @+uw:F32 -> @+uh:F32 -> Matrix

pixels is the device pixels per user unit of the referencing element; the content is compiled for the pattern frame's own device scale. Pattern space to the referencing element's user space.

def pattern.tile source · line 2986 · raw

@e:0x823f0d97991344accc44fe457a33356a/xml.Element -> @box:Bounds -> @+w:F32 -> @+h:F32 -> @opacity:F32 -> @build:(@_:String -> @_:F32 -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @+pixels:F32 -> Brush

def pattern.build source · line 3016 · raw

@+node:0x823f0d97991344accc44fe457a33356a/xml.Element -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @active:List<&2, String> -> @box:Bounds -> @w:F32 -> @h:F32 -> @opacity:F32 -> @build:(@_:String -> @_:F32 -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @+pixels:F32 -> Brush

def matrix.show source · line 3022 · raw

@m:Matrix -> String

def scene.marked source · line 3030 · raw

@scene:Scene<Brush> -> @nodes:List<&2, Scene<Brush>> -> Scene<Brush>

Marker instances have independent styles and viewports. Their geometry does not enlarge the referring shape's object bounding box.

def marker.angle.number source · line 3034 · raw

@n:0xaff2b2d0565125a37b5df94a39451ef8/scan.Number -> F32

def marker.orient source · line 3039 · raw

@+s:String -> @angle:F32 -> @start:Bool -> F32

def marker.reference.point source · line 3043 · raw

@p:Point -> @+width:F32 -> @+height:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def marker.resource source · line 3047 · raw

@+result:Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @id:String -> @vertex:MarkerVertex -> @start:Bool -> @strokeWidth:F32 -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def marker.instance source · line 3063 · raw

@+value:String -> @vertex:MarkerVertex -> @start:Bool -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @active:List<&2, String> -> @width:F32 -> @w:F32 -> @h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def marker.elements.append source · line 3068 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @ys:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def marker.enabled source · line 3085 · raw

@ms:MarkerStyle -> Bool

def marker.shape source · line 3089 · raw

@+name:String -> Bool

def marker.wanted source · line 3092 · raw

@+name:String -> @s:Style -> Bool

def marker.instances source · line 3096 · raw

@+name:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+s:Style -> @all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @active:List<&2, String> -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def compile.geometry source · line 3103 · raw

@marked:Bool -> @data:String -> @+n:String -> @+attrs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @glyphs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+vw:F32 -> @+vh:F32 -> @+tol:F32 -> @+style:Style -> @all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @active:List<&2, String> -> Pair(List<&2, Edge>, List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>)

A shape's edges and its marker instances. Path data is shared with the marker trace only when markers are wanted.

def compile.visible source · line 3110 · raw

@geo:Pair(List<&2, Edge>, List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>) -> @+n:String -> @+matrix:Matrix -> @+vw:F32 -> @+vh:F32 -> @viewportClip:Clip -> @+style:Style -> @embedded:EmbeddedImage -> @+attrs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+active:List<&2, String> -> @+scale:F32 -> @masks:(@_:String -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @fills:(@_:String -> @_:F32 -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @strokes:(@_:String -> @_:F32 -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @markers:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @children:(@_:Style -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> List<&2, Scene<Brush>>

def compile.node source · line 3121 · raw

@+n:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+glyphs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+vp:Viewport -> @inherited:Style -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+active:List<&2, String> -> @+scale:F32 -> @data:String -> @masks:(@_:String -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @fills:(@_:String -> @_:F32 -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @strokes:(@_:String -> @_:F32 -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @markers:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> @children:(@_:Style -> @_:Matrix -> @_:F32 -> @_:F32 -> List<&2, Scene<Brush>>) -> List<&2, Scene<Brush>>

def compile source · line 3163 · raw

@+fuel:Nat -> @xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+inherited:Style -> @+m:Matrix -> @+w:F32 -> @+h:F32 -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+root:Bool -> @+active:List<&2, String> -> @+scale:F32 -> List<&2, Scene<Brush>>

def text.font.em source · line 3172 · raw

@font:TextFont -> F32

def text.font.default source · line 3176 · raw

@book:0x4aebc9c35d542fdd4ecdfb1af73440f8/font.FontBook -> TextFont

def text.measure source · line 3179 · raw

@+num:0xaff2b2d0565125a37b5df94a39451ef8/scan.Number -> @ref:F32 -> @+size:F32 -> F32

def text.font.size source · line 3185 · raw

@+s:String -> @+parent:F32 -> F32

def text.font.inherit source · line 3190 · raw

@+font:TextFont -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> TextFont

def text.length.value source · line 3210 · raw

@+num:0xaff2b2d0565125a37b5df94a39451ef8/scan.Number -> @+ref:F32 -> @+size:F32 -> @next:(@_:String -> List<&2, F32>) -> List<&2, F32>

def text.frame source · line 3221 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @start:U32 -> @+w:F32 -> @+h:F32 -> @+size:F32 -> TextFrame

def text.at source · line 3228 · raw

@xs:List<&2, F32> -> @+index:U32 -> @+repeat:Bool -> @previous:TextValue -> TextValue

def text.axis.first source · line 3235 · raw

@+value:TextValue -> @fallback:(@_:Unit -> TextValue) -> TextValue

def text.axis source · line 3239 · raw

@xs:List<&2, TextFrame> -> @+index:U32 -> @+axis:U32 -> TextValue

def text.position source · line 3250 · raw

@+frames:List<&2, TextFrame> -> @+index:U32 -> TextPosition

def text.cursor source · line 3261 · raw

TextCursor

def text.chunk source · line 3264 · raw

@+cursor:TextCursor -> List<&2, TextChunk>

def text.index source · line 3269 · raw

@cursor:TextCursor -> U32

def text.path.target source · line 3274 · raw

@target:Maybe<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

XML.Text paths use the same flattened geometry as fills and strokes.

def text.path.attrs source · line 3281 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def text.path.resolve.node source · line 3287 · raw

@+n:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+kids:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @txt:String -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @w:F32 -> @h:F32 -> @vp:Viewport -> @expand:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:F32 -> @_:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>) -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def text.path.edges source · line 3301 · raw

@+xs:List<&2, Edge> -> @+acc:List<&2, Edge> -> List<&2, Edge>

def text.path.geometry source · line 3306 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, Edge>

def text.path.total source · line 3309 · raw

@xs:List<&2, Edge> -> F32

def text.path.at source · line 3314 · raw

@+xs:List<&2, Edge> -> @+distance:F32 -> @fallback:Matrix -> Matrix

def text.path.offset source · line 3326 · raw

@+num:0xaff2b2d0565125a37b5df94a39451ef8/scan.Number -> @+total:F32 -> @+calibration:F32 -> @em:F32 -> F32

def text.path.begin source · line 3330 · raw

@+cursor:TextCursor -> TextCursor

def text.path.end source · line 3334 · raw

@+cursor:TextCursor -> @+matrix:Matrix -> TextCursor

def text.path.frames source · line 3339 · raw

@xs:List<&2, TextFrame> -> List<&2, TextFrame>

def text.nodes.append source · line 3347 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @ys:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def text.layout.combine source · line 3352 · raw

@left:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @result:TextLayout -> TextLayout

def text.layout.then source · line 3356 · raw

@result:TextLayout -> @next:(@_:TextCursor -> TextLayout) -> TextLayout

def text.baseline source · line 3360 · raw

@+font:TextFont -> F32

def text.glyph.node source · line 3370 · raw

@outline:String -> @advance:F32 -> @width:F32 -> @extra:F32 -> @x:F32 -> @+matrix:Matrix -> @chunk:U32 -> @index:U32 -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def text.place source · line 3374 · raw

@+cursor:TextCursor -> @+font:TextFont -> @+glyph:0x4aebc9c35d542fdd4ecdfb1af73440f8/font.FontGlyph -> @+pos:TextPosition -> @+ch:U32 -> TextLayout

def text.character source · line 3394 · raw

@+cursor:TextCursor -> @+font:TextFont -> @frames:List<&2, TextFrame> -> @+ch:U32 -> TextLayout

def text.measure.empty source · line 3412 · raw

TextMeasure

def text.measure.add source · line 3415 · raw

@m:TextMeasure -> @+x:F32 -> @+width:F32 -> @extra:F32 -> @fixed:Bool -> TextMeasure

def text.measure.nodes source · line 3419 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+skip:String -> @+acc:TextMeasure -> TextMeasure

def text.length.matrix source · line 3430 · raw

@m:Matrix -> @+ratio:F32 -> @delta:F32 -> Matrix

def text.length.attrs source · line 3434 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+ratio:F32 -> @+delta:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def text.length.translate source · line 3440 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+delta:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def text.fit.append source · line 3452 · raw

@nodes:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @result:TextFit -> TextFit

def text.fit.then source · line 3456 · raw

@result:TextFit -> @next:(@_:U32 -> @_:F32 -> TextFit) -> TextFit

def text.fit.group source · line 3460 · raw

@n:String -> @as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @txt:String -> @result:TextFit -> TextFit

def text.length.finish source · line 3481 · raw

@fit:TextFit -> @cursor:TextCursor -> @delta:F32 -> TextLayout

def text.length.fit source · line 3486 · raw

@+result:TextLayout -> @+m:TextMeasure -> @+target:F32 -> @+stretch:Bool -> @+skip:String -> TextLayout

def text.length.valid source · line 3497 · raw

@num:0xaff2b2d0565125a37b5df94a39451ef8/scan.Number -> Bool

def text.length source · line 3501 · raw

@+result:TextLayout -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @w:F32 -> @size:F32 -> @trimEnd:Bool -> TextLayout

def text.length.group.attrs source · line 3509 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+m:TextMeasure -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def text.layout.group source · line 3514 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+result:TextLayout -> TextLayout

def text.path.layout source · line 3518 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @result:TextLayout -> @em:F32 -> TextLayout

def text.chunk.shift source · line 3538 · raw

@xs:List<&2, TextChunk> -> @+key:U32 -> F32

def text.anchor.nodes source · line 3543 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+chunks:List<&2, TextChunk> -> @+skip:String -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def text.path.glyph.matrix source · line 3557 · raw

@+mat:Matrix -> @+position:Matrix -> @+advance:F32 -> Matrix

def text.path.glyph source · line 3564 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+edges:List<&2, Edge> -> @+total:F32 -> @offset:F32 -> @+mat:Matrix -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def text.path.map source · line 3571 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+edges:List<&2, Edge> -> @+total:F32 -> @+offset:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def text.path.mapped source · line 3578 · raw

@kids:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def text.path.finish source · line 3583 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def text.cell source · line 3589 · raw

@+mat:Matrix -> @+width:F32 -> @box:Bounds -> Bounds

def text.bounds source · line 3593 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+matrix:Matrix -> @+box:Bounds -> Bounds

def text.bounds.show source · line 3603 · raw

@box:Bounds -> String

def text.paint.bounds source · line 3607 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+box:String -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def text.finished.nodes source · line 3612 · raw

@+nodes:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def text.finish source · line 3616 · raw

@+result:TextLayout -> @as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def text.font.reset source · line 3621 · raw

@font:TextFont -> TextFont

def text.expand.node source · line 3625 · raw

@+n:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+kids:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @txt:String -> @+font:TextFont -> @+vp:Viewport -> @expand:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:TextFont -> @_:F32 -> @_:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>) -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def text.paint.reverse source · line 3646 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @acc:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def text.paint.attrs source · line 3660 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

def text.paint.run source · line 3665 · raw

@run:TextPaintRun -> @next:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>) -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def context.unfaded source · line 3681 · raw

@+brush:Brush -> Brush

Resolve context paints after compiling the finite scene tree. Paint server coordinates stay in the referencing shape's space, including bounding boxes.

def context.select source · line 3691 · raw

@paint:Paint<Brush> -> @stroke:Bool -> Brush

def context.brush source · line 3695 · raw

@brush:Brush -> @paint:Paint<Brush> -> @matrix:Matrix -> @patterns:(@_:List<&2, Scene<Brush>> -> List<&2, Scene<Brush>>) -> Brush

def context.empty source · line 3705 · raw

Paint<Brush>

def context.paint source · line 3708 · raw

@ink:Paint<Brush> -> @+paint:Paint<Brush> -> @+matrix:Matrix -> @fills:(@_:List<&2, Scene<Brush>> -> List<&2, Scene<Brush>>) -> @strokes:(@_:List<&2, Scene<Brush>> -> List<&2, Scene<Brush>>) -> Paint<Brush>

def stroke.mesh.bounds source · line 3712 · raw

@mesh:StrokeMesh -> Bounds

def scene.count source · line 3716 · raw

@xs:List<&2, Scene<Brush>> -> U32

def scene.coverage source · line 3721 · raw

@xs:List<&2, Scene<Brush>> -> @box:Bounds -> Bounds

def scene.effect.coverage source · line 3727 · raw

@effect:FilterEffect -> @cached:Bounds -> @computed:Bounds -> Bounds

def scene.covered source · line 3733 · raw

@+scene:Scene<Brush> -> Scene<Brush>

def context.node source · line 3738 · raw

@scene:Scene<Brush> -> @+ink:Paint<Brush> -> @kids:List<&2, Scene<Brush>> -> @masks:List<&2, Scene<Brush>> -> @markers:(@_:Paint<Brush> -> List<&2, Scene<Brush>>) -> Scene<Brush>

def image.svg.stack.empty source · line 3753 · raw

@stack:List<&2, String> -> Bool

def image.svg.read source · line 3773 · raw

@+text:String -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def image.svg.utf8 source · line 3789 · raw

@+data:0xb4c178c822e0e37d625a581d728097d3/bytes.Bytes -> @+at:U32 -> ImageCodepoint

def image.svg.utf8.more source · line 3796 · raw

@decoded:ImageCodepoint -> @acc:String -> @next:(@_:U32 -> @_:String -> String) -> String

def image.svg.utf8.push source · line 3804 · raw

@+out:0xb4c178c822e0e37d625a581d728097d3/bytes.Bytes -> @+c:U32 -> 0xb4c178c822e0e37d625a581d728097d3/bytes.Bytes

def image.svg.uri.bytes source · line 3810 · raw

@+s:String -> @+out:0xb4c178c822e0e37d625a581d728097d3/bytes.Bytes -> 0xb4c178c822e0e37d625a581d728097d3/bytes.Bytes

def image.svg.source source · line 3818 · raw

@+scan:0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan -> String

def image.svg.root source · line 3823 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def image.svg.document source · line 3829 · raw

@root:0x823f0d97991344accc44fe457a33356a/xml.Element -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def image.svg.attrs source · line 3835 · raw

@root:0x823f0d97991344accc44fe457a33356a/xml.Element -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr>

Intrinsic dimensions come from the root's own width/height attributes; the document stylesheet only styles the content once the viewport is known.

def image.svg.absolute source · line 3839 · raw

@+s:String -> F32

def image.svg.ratio source · line 3842 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> F32

def image.svg.size source · line 3850 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> Point

def image.svg.normalized source · line 3861 · raw

@root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @size:Point -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def image.svg.place source · line 3866 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+size:Point -> @+root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @expand:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:F32 -> @_:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>) -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def image.svg.sized source · line 3876 · raw

@as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @expand:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:F32 -> @_:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>) -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def image.svg.node source · line 3880 · raw

@as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @expand:(@_:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @_:F32 -> @_:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>) -> 0x823f0d97991344accc44fe457a33356a/xml.Element

def image.svg.mime.name source · line 3884 · raw

@scan:0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan -> Bool

def image.svg.mime source · line 3888 · raw

@scan:0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan -> Bool

def image.svg.scheme source · line 3892 · raw

@scan:0xaff2b2d0565125a37b5df94a39451ef8/scan.Scan -> Bool

def image.svg.reference source · line 3896 · raw

@href:String -> Bool

def text.present source · line 3912 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> Bool

Font loading must include text hidden inside an SVG image data URI.

def expand.images source · line 3920 · raw

@has:Bool -> @xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

The expansion passes each rebuild the whole tree, so a document without images, uses or text skips them; an embedded SVG image may bring any of the three, so images imply all passes.

def expand.uses source · line 3925 · raw

@has:Bool -> @+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def expand.text source · line 3930 · raw

@has:Bool -> @+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @book:0x4aebc9c35d542fdd4ecdfb1af73440f8/font.FontBook -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

def document.styled source · line 3937 · raw

@has:Bool -> @+kids:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

Without a stylesheet the CSS pass would only merge style attributes, which CSS.properties does on demand, so the tree is used as parsed.

def document.camera.fonts source · line 3942 · raw

@+root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @+w:F32 -> @+h:F32 -> @matrix:Matrix -> @book:0x4aebc9c35d542fdd4ecdfb1af73440f8/font.FontBook -> List<&2, Scene<Brush>>

def document.fonts source · line 3950 · raw

@root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @w:F32 -> @h:F32 -> @book:0x4aebc9c35d542fdd4ecdfb1af73440f8/font.FontBook -> List<&2, Scene<Brush>>

def document.size source · line 3954 · raw

@+root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @+w:F32 -> @+h:F32 -> Point

The document viewport and the output matrix have independent dimensions.

def document.fit.matrix source · line 3961 · raw

@size:Point -> @+w:F32 -> @+h:F32 -> Matrix

def document.natural.size source · line 3968 · raw

@root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @matrix:Matrix -> @book:0x4aebc9c35d542fdd4ecdfb1af73440f8/font.FontBook -> @size:Point -> List<&2, Scene<Brush>>

def document.natural.fonts source · line 3972 · raw

@+root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @+w:F32 -> @+h:F32 -> @matrix:Matrix -> @book:0x4aebc9c35d542fdd4ecdfb1af73440f8/font.FontBook -> List<&2, Scene<Brush>>

def document.fitted.size source · line 3975 · raw

@root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @w:F32 -> @h:F32 -> @book:0x4aebc9c35d542fdd4ecdfb1af73440f8/font.FontBook -> @+size:Point -> List<&2, Scene<Brush>>

def document.fitted.fonts source · line 3979 · raw

@+root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @+w:F32 -> @+h:F32 -> @book:0x4aebc9c35d542fdd4ecdfb1af73440f8/font.FontBook -> List<&2, Scene<Brush>>

def document source · line 3982 · raw

@root:0x823f0d97991344accc44fe457a33356a/xml.Element -> @w:F32 -> @h:F32 -> List<&2, Scene<Brush>>

def pixel.color source · line 3987 · raw

@+scene:List<&2, Scene<Brush>> -> @x:U32 -> @y:U32 -> @+aa:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

Every fill, stroke and clip carries its analytic coverage (see cover.scenes), so one sample at the pixel center reads exact area coverage; paint is evaluated there.

def channel source · line 3991 · raw

@x:F32 -> U32

def color.pack source · line 3994 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> U32

def pixel source · line 3998 · raw

@+scene:List<&2, Scene<Brush>> -> @x:U32 -> @y:U32 -> @aa:U32 -> U32

def bounds.nonempty source · line 4001 · raw

@b:Bounds -> Bool

def bounds.expand source · line 4005 · raw

@b:Bounds -> @+margin:F32 -> Bounds

def bounds.overlap source · line 4009 · raw

@a:Bounds -> @b:Bounds -> Bool

def raster.format source · line 4018 · raw

@box:Bounds -> @requested:F32 -> Raster

def raster.empty source · line 4031 · raw

Raster

def raster.store source · line 4034 · raw

@format:Raster -> @pixels:0x6053821c66ad4107092f3cff65679fc6/image.Pixels -> @linear:Bool -> Raster

def raster.position source · line 4038 · raw

@+format:Raster -> @x:F32 -> @y:F32 -> Point

def raster.scale source · line 4042 · raw

@format:Raster -> F32

def raster.is.linear source · line 4046 · raw

@format:Raster -> Bool

def raster.tile.box source · line 4050 · raw

@+format:Raster -> @+x:U32 -> @+y:U32 -> @size:U32 -> Bounds

def raster.in.frame source · line 4056 · raw

@format:Raster -> @x:U32 -> @y:U32 -> Bool

def raster.scene.pixel source · line 4060 · raw

@+format:Raster -> @+x:U32 -> @+y:U32 -> @nodes:List<&2, Scene<Brush>> -> @+aa:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def raster.scene.tiles source · line 4064 · raw

@depth:Nat -> @+x:U32 -> @+y:U32 -> @+format:Raster -> @+nodes:List<&2, Scene<Brush>> -> @+box:Bounds -> @+aa:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Pixels

def cover.sub source · line 4082 · raw

@+aa:U32 -> U32

Sub-scanlines per pixel row: the requested AA level, never below four.

def cover.pixel source · line 4085 · raw

@+frame:Raster -> @p:Point -> Point

def cover.line source · line 4091 · raw

@a:Point -> @b:Point -> 0x8ba6f756b9429dce8795c1d22eb97549/cover.CovLine

def cover.lines source · line 4096 · raw

@es:List<&2, Edge> -> @+frame:Raster -> List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.CovLine>

def cover.lines.add source · line 4102 · raw

@acc:0x8ba6f756b9429dce8795c1d22eb97549/cover.CovLines -> @a:Point -> @b:Point -> 0x8ba6f756b9429dce8795c1d22eb97549/cover.CovLines

Local edges through m onto the frame's pixel grid in one pass.

def cover.lines.through source · line 4107 · raw

@es:List<&2, Edge> -> @+m:Matrix -> @+frame:Raster -> @acc:0x8ba6f756b9429dce8795c1d22eb97549/cover.CovLines -> 0x8ba6f756b9429dce8795c1d22eb97549/cover.CovLines

def cover.build source · line 4114 · raw

@lines:0x8ba6f756b9429dce8795c1d22eb97549/cover.CovLines -> @+even:Bool -> @+frame:Raster -> @+sub:U32 -> @+trees:Bool -> Cover

With trees the mask carries the quadtree that clip and pixel queries need; a fill painted directly keeps only its rows of runs.

def cover.edges source · line 4119 · raw

@es:List<&2, Edge> -> @+m:Matrix -> @+even:Bool -> @+frame:Raster -> @+sub:U32 -> @+trees:Bool -> Cover

Local edges through m (local to device) onto the frame's pixel grid.

def cover.tree.edges source · line 4122 · raw

@t:EdgeTree -> @acc:List<&2, Edge> -> List<&2, Edge>

def cover.reverse source · line 4126 · raw

@pts:List<&2, Point> -> @acc:List<&2, Point> -> List<&2, Point>

def cover.area source · line 4131 · raw

@pts:List<&2, Point> -> @+first:Point -> @+acc:F32 -> F32

def cover.oriented source · line 4140 · raw

@pts:List<&2, Point> -> List<&2, Point>

Every part polygon is oriented the same way so nonzero winding unions them.

def cover.close source · line 4148 · raw

@pts:List<&2, Point> -> @+first:Point -> @acc:List<&2, Edge> -> List<&2, Edge>

def cover.polygon source · line 4156 · raw

@pts:List<&2, Point> -> @acc:List<&2, Edge> -> List<&2, Edge>

def cover.arc source · line 4163 · raw

@n:Nat -> @+c:Point -> @+r:F32 -> @+angle:F32 -> @+step:F32 -> @acc:List<&2, Point> -> List<&2, Point>

def cover.segments source · line 4168 · raw

@+extent:F32 -> @+radius:F32 -> U32

def cover.wrap source · line 4171 · raw

@+a:F32 -> F32

def cover.angle source · line 4174 · raw

@p:Point -> F32

def cover.scale source · line 4178 · raw

@+m:Matrix -> @+frame:Raster -> F32

def cover.stroke source · line 4184 · raw

@mesh:StrokeMesh -> @+frame:Raster -> @+sub:U32 -> @+trees:Bool -> StrokeMesh

The covered mesh keeps its bounds and cover; its edges are consumed.

def cover.clip source · line 4190 · raw

@c:Clip -> @+frame:Raster -> @+sub:U32 -> Clip

def cover.fill.if source · line 4201 · raw

@paints:Bool -> @f:Fill -> @es:List<&2, Edge> -> @+m:Matrix -> @+even:Bool -> @+frame:Raster -> @+sub:U32 -> @+trees:Bool -> Fill

def cover.stroke.if source · line 4208 · raw

@paints:Bool -> @mesh:StrokeMesh -> @+frame:Raster -> @+sub:U32 -> @+trees:Bool -> StrokeMesh

def style.fills source · line 4214 · raw

@+s:Style -> Bool

Whether a style paints its fill or its stroke at all; masks are only built for those.

def style.strokes source · line 4218 · raw

@+s:Style -> Bool

def cover.rule source · line 4222 · raw

@+s:Style -> Bool

def cover.density source · line 4228 · raw

@+m:Matrix -> @+frame:Raster -> F32

---- pattern tiles ---- Device pixels per pattern unit along the denser tile axis; m maps pattern space to device.

def cover.tile.frame source · line 4232 · raw

@+w:F32 -> @+h:F32 -> @+density:F32 -> Raster

def cover.tile.wrapped source · line 4235 · raw

@p:Point -> @+w:F32 -> @+h:F32 -> Point

def cover.tile.center source · line 4240 · raw

@+frame:Raster -> @+x:U32 -> @+y:U32 -> @+w:F32 -> @+h:F32 -> Point

Pixel centers wrap into the tile, so a partial last column or row shows the tile's start.

def cover.tile source · line 4256 · raw

@+frame:Raster -> @nodes:List<&2, Scene<Brush>> -> @+w:F32 -> @+h:F32 -> Raster

def reduce.weight source · line 4267 · raw

@+lo:F32 -> @+hi:F32 -> @+i:U32 -> F32

Overlap of [lo, hi) with source pixel i.

def reduce.cell source · line 4283 · raw

@+pixels:0x6053821c66ad4107092f3cff65679fc6/image.Pixels -> @+side:U32 -> @+x:U32 -> @+y:U32 -> @+w:U32 -> @+h:U32 -> @+fx:F32 -> @+fy:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

Output pixel (x, y) covers source [x fx, (x + 1) fx) by [y fy, (y + 1) fy), clipped to the image.

def raster.resample source · line 4306 · raw

@+r:Raster -> @+rw:U32 -> @+rh:U32 -> @+fx:F32 -> @+fy:F32 -> Raster

Resample to rw by rh pixels, each covering fx by fy source pixels.

def raster.reduce source · line 4312 · raw

@+r:Raster -> @+rw:U32 -> @+rh:U32 -> Raster

Reduce a whole image to rw by rh pixels; the caller rescales the brush inverse to match.

def cover.aligned source · line 4322 · raw

@+m:Matrix -> Bool

An axis-aligned tile of at least four device pixels is rendered at device density and read bilinearly (nearest-neighbour images stay crisp). A rotated, skewed or tiny tile is rendered at sub times the density, or at least four pixels across, and read with a sub by sub grid of nearest lookups over each device pixel's footprint: rotated content keeps supersampled edges and a tile smaller than a pixel averages out.

def cover.vector source · line 4327 · raw

@+m:Matrix -> @+x:F32 -> @+y:F32 -> Point

The linear part of m applied to (x, y).

def cover.axes source · line 4332 · raw

@+m:Matrix -> @+frame:Raster -> Point

Device pixels per image pixel along each image axis; m maps image pixels to device.

def cover.reduced source · line 4337 · raw

@+size:U32 -> @+density:F32 -> U32

def cover.bitmap.sized source · line 4341 · raw

@+raster:Raster -> @+inv:Matrix -> @+nearest:Bool -> @+w:U32 -> @+h:U32 -> @+rw:U32 -> @+rh:U32 -> Brush

def cover.bitmap source · line 4347 · raw

@+raster:Raster -> @+inv:Matrix -> @+nearest:Bool -> @axes:Point -> Brush

A minified image is box-filtered down to its device footprint (see raster.resample).

def cover.brush source · line 4354 · raw

@brush:Brush -> @+m:Matrix -> @+frame:Raster -> @+sub:U32 -> @cover:(@_:List<&2, Scene<Brush>> -> @_:Raster -> @_:U32 -> List<&2, Scene<Brush>>) -> Brush

A pattern brush becomes a tile raster at the frame's resolution, its content covered on that tile grid first; m maps the brush's local space to device space.

def cover.paint source · line 4378 · raw

@ink:Paint<Brush> -> @+m:Matrix -> @+frame:Raster -> @+sub:U32 -> @fills:(@_:List<&2, Scene<Brush>> -> @_:Raster -> @_:U32 -> List<&2, Scene<Brush>>) -> @strokes:(@_:List<&2, Scene<Brush>> -> @_:Raster -> @_:U32 -> List<&2, Scene<Brush>>) -> Paint<Brush>

def paint.fill source · line 4382 · raw

@+ink:Paint<Brush> -> Brush

def cover.image.rect source · line 4386 · raw

@+raster:Raster -> List<&2, Edge>

def cover.image.clip source · line 4392 · raw

@+brush:Brush -> @clip:Clip -> @+iv:Matrix -> @+frame:Raster -> @+sub:U32 -> Clip

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.reach source · line 4402 · raw

@+inv:Matrix -> @+half:F32 -> F32

Half a device pixel in local units, so a scene whose box only reaches into part of a pixel is still painted there: the pixel center may lie outside the box.

def raster.scene source · line 4421 · raw

@+format:Raster -> @+nodes:List<&2, Scene<Brush>> -> @+aa:U32 -> Raster

def color.alpha.only source · line 4430 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.input.color source · line 4434 · raw

@input:FilterInput -> @p:Point -> @linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.input.raster source · line 4439 · raw

@input:FilterInput -> Raster

def color.straight source · line 4449 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.premultiply source · line 4454 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.premul.clamp source · line 4459 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.row source · line 4464 · raw

@row:ColorRow -> @c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> F32

def filter.matrix source · line 4469 · raw

@rows:ColorMatrix -> @c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.matrix.row source · line 4474 · raw

@+vs:List<&2, F32> -> @+start:U32 -> @+diagonal:U32 -> ColorRow

def filter.matrix.identity source · line 4477 · raw

ColorMatrix

def filter.matrix.saturate source · line 4480 · raw

@+s:F32 -> ColorMatrix

def filter.matrix.hue source · line 4483 · raw

@angle:F32 -> ColorMatrix

def filter.matrix.parse source · line 4489 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> ColorMatrix

def transfer.identity source · line 4500 · raw

Transfer

def transfer.parse source · line 4503 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> Transfer

def transfer.find source · line 4508 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+name:String -> Transfer

def transfer.apply source · line 4514 · raw

@+t:Transfer -> @+x:F32 -> F32

def filter.transfer source · line 4524 · raw

@r:Transfer -> @g:Transfer -> @b:Transfer -> @a:Transfer -> @c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def color.alpha source · line 4529 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> F32

def filter.arithmetic source · line 4533 · raw

@+a:F32 -> @+b:F32 -> @k1:F32 -> @k2:F32 -> @k3:F32 -> @k4:F32 -> F32

def filter.composite source · line 4536 · raw

@+a:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+b:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+kind:U32 -> @+k1:F32 -> @+k2:F32 -> @+k3:F32 -> @+k4:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.blend.hard source · line 4545 · raw

@+a:F32 -> @+b:F32 -> F32

def filter.blend.soft source · line 4548 · raw

@+a:F32 -> @+b:F32 -> F32

def filter.blend.channel source · line 4552 · raw

@+a:F32 -> @+b:F32 -> @kind:U32 -> F32

def filter.blend.lum source · line 4567 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> F32

def filter.blend.sat source · line 4571 · raw

@+c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> F32

def filter.blend.setsat source · line 4575 · raw

@+c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+s:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.blend.clip.scale source · line 4582 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+l:F32 -> @+scale:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.blend.clip source · line 4586 · raw

@+c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.blend.setlum source · line 4595 · raw

@+c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @l:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.blend.rgb source · line 4600 · raw

@+a:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+b:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+kind:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.blend source · line 4609 · raw

@+a:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+b:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+kind:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.merge source · line 4635 · raw

@xs:List<&2, FilterInput> -> @+p:Point -> @+linear:Bool -> @back:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.convolve source · line 4640 · raw

@xs:List<&2, FilterTap> -> @+input:FilterInput -> @+p:Point -> @+linear:Bool -> @acc:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.morphology.join source · line 4646 · raw

@+a:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+b:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+dilate:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

Morphology takes component-wise extrema of premultiplied channels.

def filter.morphology.sample source · line 4651 · raw

@left:Nat -> @+index:F32 -> @+direction:Point -> @+dilate:Bool -> @+input:FilterInput -> @+p:Point -> @+linear:Bool -> @acc:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.convolution.index source · line 4658 · raw

@+n:F32 -> @+low:F32 -> @+high:F32 -> @edge:U32 -> F32

def filter.convolution.raw source · line 4662 · raw

@+input:FilterInput -> @x:F32 -> @y:F32 -> @+linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.convolution.pixel source · line 4670 · raw

@+input:FilterInput -> @+limits:Bounds -> @+edge:U32 -> @+x:F32 -> @+y:F32 -> @linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.convolution.horizontal source · line 4675 · raw

@+input:FilterInput -> @+limits:Bounds -> @+edge:U32 -> @+x:F32 -> @+y:F32 -> @+dx:F32 -> @+linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.convolution.at source · line 4679 · raw

@+input:FilterInput -> @+limits:Bounds -> @+edge:U32 -> @+raster:Raster -> @p:Point -> @+linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.convolution.color source · line 4691 · raw

@+input:FilterInput -> @limits:Bounds -> @edge:U32 -> @p:Point -> @linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.convolution.sum source · line 4694 · raw

@xs:List<&2, FilterTap> -> @+input:FilterInput -> @+limits:Bounds -> @+edge:U32 -> @+preserve:Bool -> @+p:Point -> @+linear:Bool -> @acc:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.convolution.finish source · line 4701 · raw

@+c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+divisor:F32 -> @+bias:F32 -> @+preserve:Bool -> @original:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.convolution.sample source · line 4709 · raw

@+spec:Convolution -> @+input:FilterInput -> @+p:Point -> @+linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.op.sample source · line 4713 · raw

@op:FilterOp -> @+a:FilterInput -> @+b:FilterInput -> @+p:Point -> @+linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.region.inside source · line 4733 · raw

@b:Bounds -> @p:Point -> Bool

def filter.window.contains source · line 4740 · raw

@region:Bounds -> @tile:Bounds -> U32

def filter.window.span source · line 4745 · raw

@window:FilterWindow -> @tile:Bounds -> U32

def filter.window.inside source · line 4751 · raw

@window:FilterWindow -> @p:Point -> Bool

def filter.window.exact source · line 4755 · raw

@window:FilterWindow -> Bool

def filter.window.aligned source · line 4760 · raw

@window:FilterWindow -> Bool

An axis-aligned window clips a buffer pixel by its exact overlap with the region.

def filter.window.overlap source · line 4765 · raw

@region:Bounds -> @local:Bounds -> F32

def filter.window.area source · line 4776 · raw

@window:FilterWindow -> @tile:Bounds -> F32

def filter.window.samples source · line 4782 · raw

@n:Nat -> @+i:U32 -> @+aa:U32 -> @+window:FilterWindow -> @+point:Point -> @+step:F32 -> @acc:F32 -> F32

def filter.draw.pixel source · line 4789 · raw

@+format:Raster -> @+x:U32 -> @+y:U32 -> @op:FilterOp -> @a:FilterInput -> @b:FilterInput -> @+window:FilterWindow -> @linear:Bool -> @+aa:U32 -> @span:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Pixels

def filter.draw.tiles source · line 4798 · raw

@depth:Nat -> @+x:U32 -> @+y:U32 -> @+format:Raster -> @+op:FilterOp -> @+a:FilterInput -> @+b:FilterInput -> @+window:FilterWindow -> @+linear:Bool -> @+aa:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Pixels

def filter.draw source · line 4811 · raw

@+format:Raster -> @op:FilterOp -> @a:FilterInput -> @b:FilterInput -> @window:FilterWindow -> @+linear:Bool -> @aa:U32 -> Raster

def filter.kernel.raw source · line 4815 · raw

@n:Nat -> @+i:F32 -> @+radius:F32 -> @+sigma:F32 -> @+direction:Point -> List<&2, FilterTap>

def filter.kernel.sum source · line 4822 · raw

@xs:List<&2, FilterTap> -> F32

def filter.kernel.normalize source · line 4827 · raw

@xs:List<&2, FilterTap> -> @+total:F32 -> List<&2, FilterTap>

def filter.kernel source · line 4832 · raw

@+vector:Point -> @+step:F32 -> List<&2, FilterTap>

def filter.result source · line 4843 · raw

@xs:List<&2, FilterResult> -> @+name:String -> @+fallback:FilterInput -> FilterInput

def filter.input.alpha source · line 4849 · raw

@input:FilterInput -> FilterInput

def filter.resolve source · line 4853 · raw

@+name:String -> @+source:FilterInput -> @previous:FilterInput -> @results:List<&2, FilterResult> -> FilterInput

def filter.input.region source · line 4857 · raw

@input:FilterInput -> Bounds

def filter.merge.inputs source · line 4861 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+source:FilterInput -> @+previous:FilterInput -> @+results:List<&2, FilterResult> -> List<&2, FilterInput>

def filter.inputs.region source · line 4867 · raw

@xs:List<&2, FilterInput> -> @box:Bounds -> Bounds

def bounds.intersection source · line 4872 · raw

@a:Bounds -> @b:Bounds -> Bounds

def filter.subregion source · line 4877 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @box:Bounds -> @viewport:Point -> Bounds

def matrix.vector source · line 4888 · raw

@+m:Matrix -> @p:Point -> Point

def filter.offset source · line 4891 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @viewport:Point -> Point

def filter.operator source · line 4895 · raw

@+name:String -> U32

def filter.blend.mode source · line 4898 · raw

@+name:String -> U32

def filter.flood source · line 4901 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def filter.op.parse source · line 4905 · raw

@+name:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+kids:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @units:Matrix -> @viewport:Point -> @merges:List<&2, FilterInput> -> FilterOp

def filter.blur source · line 4914 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+format:Raster -> @+input:FilterInput -> @+units:Matrix -> @window:FilterWindow -> @+linear:Bool -> @+aa:U32 -> Raster

def filter.morphology.axis source · line 4925 · raw

@+vector:Point -> @+step:F32 -> @dilate:Bool -> FilterOp

Rectangular min/max is separable along the transformed primitive axes. A radius beyond the finite buffer diagonal only visits transparent samples.

def filter.morphology source · line 4930 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+format:Raster -> @+input:FilterInput -> @+units:Matrix -> @window:FilterWindow -> @+linear:Bool -> @+aa:U32 -> Raster

def filter.shadow source · line 4939 · raw

@+attrs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+format:Raster -> @+input:FilterInput -> @+units:Matrix -> @+viewport:Point -> @+window:FilterWindow -> @+linear:Bool -> @+aa:U32 -> Raster

def filter.convolution.taps source · line 4949 · raw

@+xs:List<&2, F32> -> @+index:U32 -> @+width:U32 -> @+height:U32 -> @+tx:F32 -> @+ty:F32 -> @+dx:Point -> @+dy:Point -> List<&2, FilterTap>

The row-major kernel is rotated 180 degrees; target offsets refer to input cells.

def filter.convolution.limits.box source · line 4958 · raw

@+raster:Raster -> @box:Bounds -> Bounds

def filter.convolution.bounds source · line 4964 · raw

@box:Bounds -> @+units:Matrix -> Bounds

Resource domains need exact edges; geometric coverage bounds include a tolerance.

def filter.convolution.limits source · line 4972 · raw

@input:FilterInput -> @units:Matrix -> Bounds

def filter.convolution.parse source · line 4976 · raw

@+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+units:Matrix -> @+input:FilterInput -> @+format:Raster -> FilterOp

def filter.primitive source · line 4999 · raw

@+name:String -> @+as:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Attr> -> @+kids:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+format:Raster -> @+source:FilterInput -> @+previous:FilterInput -> @+results:List<&2, FilterResult> -> @+region:Bounds -> @+units:Matrix -> @+viewport:Point -> @+aa:U32 -> FilterInput

def filter.padding source · line 5020 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+units:Matrix -> @+margin:F32 -> F32

def filter.present source · line 5034 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> Bool

def filter.density source · line 5039 · raw

@+m:Matrix -> F32

def filter.source source · line 5047 · raw

@scene:Scene<Brush> -> Scene<Brush>

def filter.render source · line 5051 · raw

@+scene:Scene<Brush> -> @+region:Bounds -> @+units:Matrix -> @+viewport:Point -> @+primitives:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @space:Matrix -> @+aa:U32 -> Raster

def filter.cache source · line 5061 · raw

@scene:Scene<Brush> -> @raster:Raster -> @area:Bounds -> Scene<Brush>

def prepare.effect source · line 5065 · raw

@effect:FilterEffect -> @+scene:Scene<Brush> -> @space:Matrix -> @aa:U32 -> Scene<Brush>

def prepare.brush source · line 5075 · raw

@brush:Brush -> @+space:Matrix -> @next:(@_:List<&2, Scene<Brush>> -> @_:Matrix -> List<&2, Scene<Brush>>) -> Brush

def prepare.paint source · line 5089 · raw

@ink:Paint<Brush> -> @+space:Matrix -> @fills:(@_:List<&2, Scene<Brush>> -> @_:Matrix -> List<&2, Scene<Brush>>) -> @strokes:(@_:List<&2, Scene<Brush>> -> @_:Matrix -> List<&2, Scene<Brush>>) -> Paint<Brush>

def pixel.ppm source · line 5102 · raw

@c:U32 -> String

Portable image export for headless rendering and reference comparisons.

def frame source · line 5118 · raw

@+w:U32 -> @+h:U32 -> Raster

def layer.new source · line 5127 · raw

@+t:Target -> Array<U32>

def target.index source · line 5131 · raw

@+t:Target -> @+px:U32 -> @+py:U32 -> U32

def target.within source · line 5136 · raw

@+t:Target -> @+box:Bounds -> Target

The target's rectangle intersected with a device box, as a target.

def pixel.lane source · line 5147 · raw

@+px:U32 -> @+unit:U32 -> U32

def pixel.make source · line 5150 · raw

@+r:U32 -> @+g:U32 -> @+b:U32 -> @+a:U32 -> U32

def pixel.pack source · line 5154 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+f:F32 -> U32

A premultiplied color scaled by f, rounded to 8 bits.

def pixel.round source · line 5158 · raw

@+v:U32 -> @+f:F32 -> U32

def pixel.scale source · line 5162 · raw

@+px:U32 -> @+f:F32 -> U32

A packed pixel scaled by f in every channel.

def pixel.over source · line 5167 · raw

@+front:U32 -> @+back:U32 -> U32

front over back, both premultiplied: front + back * (255 - alpha) / 255 per channel, written as one expression over the four lanes.

def pixel.white source · line 5180 · raw

@+px:U32 -> U32

The pixel over white as the packed 0xRRGGBB the outputs use.

def pixel.mask source · line 5185 · raw

@+px:U32 -> @+mode:U32 -> F32

The mask factor a packed pixel gives: its alpha, or the luminance of its premultiplied color.

def blend.got source · line 5189 · raw

@got:Pair(Array<U32>, U32) -> @+i:U32 -> @+front:U32 -> Array<U32>

def blend source · line 5194 · raw

@a:Array<U32> -> @+i:U32 -> @+front:U32 -> Array<U32>

Composite a packed front over the pixel at index i.

def paint.with source · line 5197 · raw

@cond:Bool -> @a:Array<U32> -> @yes:(@_:Array<U32> -> Array<U32>) -> @no:(@_:Array<U32> -> Array<U32>) -> Array<U32>

def cover.value source · line 5204 · raw

@present:Bool -> @+cov:Cover -> @+es:EdgeTree -> @+inv:Matrix -> @+even:Bool -> @+p:Point -> F32

def clip.limit source · line 5210 · raw

@c:Clip -> @+p:Point -> F32

clip.cover, branching through matches since it runs once per clipped pixel.

def paint.limit source · line 5223 · raw

@clips:List<&2, Clip> -> @+p:Point -> @+acc:F32 -> F32

The least coverage the enclosing clips leave at p.

def cover.block source · line 5230 · raw

@+cov:Cover -> @+x0:U32 -> @+y0:U32 -> @+x1:U32 -> @+y1:U32 -> F32

A clip's coverage over the device pixel block [x0, x1) by [y0, y1) when it is uniform there, else -1; the frame grid is the device grid.

def cover.block.if source · line 5234 · raw

@present:Bool -> @+cov:Cover -> @+x0:U32 -> @+y0:U32 -> @+x1:U32 -> @+y1:U32 -> F32

def clip.block source · line 5239 · raw

@c:Clip -> @+x0:U32 -> @+y0:U32 -> @+x1:U32 -> @+y1:U32 -> F32

def paint.limit.block source · line 5255 · raw

@clips:List<&2, Clip> -> @+x0:U32 -> @+y0:U32 -> @+x1:U32 -> @+y1:U32 -> @+acc:F32 -> F32

The least clip coverage over a block when every clip is uniform there, else -1.

def paint.clipped source · line 5262 · raw

@clips:List<&2, Clip> -> Bool

def paint.solid source · line 5275 · raw

@+brush:Brush -> Bool

def paint.solid.color source · line 5280 · raw

@+brush:Brush -> @+linear:Bool -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def paint.context source · line 5285 · raw

@+brush:Brush -> @+inv:Matrix -> @+linear:Bool -> @+clips:List<&2, Clip> -> PaintCtx

def paint.sampled source · line 5288 · raw

@+br:Brush -> @+inv:Matrix -> @+linear:Bool -> @+p:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def paint.sampled.ctx source · line 5291 · raw

@+ctx:PaintCtx -> @+p:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def paint.tint.ctx source · line 5295 · raw

@+ctx:PaintCtx -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def paint.color source · line 5299 · raw

@solid:Bool -> @+ctx:PaintCtx -> @+p:Point -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def paint.ctx.solid source · line 5304 · raw

@+ctx:PaintCtx -> Bool

def paint.ctx.direct source · line 5308 · raw

@+ctx:PaintCtx -> Bool

def paint.ctx.tint source · line 5312 · raw

@+ctx:PaintCtx -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

def paint.ctx.clips source · line 5316 · raw

@+ctx:PaintCtx -> List<&2, Clip>

def paint.pixel source · line 5322 · raw

@fb:Array<U32> -> @+x:U32 -> @+y:U32 -> @+v:F32 -> @+known:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

The general pixel: brush sampled or solid, coverage limited by the clips; a known block limit (0 or more) replaces the per-pixel clip reads.

def pixel.under source · line 5340 · raw

@+fr:U32 -> @+fg:U32 -> @+fb:U32 -> @+fa:U32 -> @+keep:U32 -> @+back:U32 -> U32

The fast pixel: a constant packed front blended along the row, its channels split once per row.

def blend.pre.got source · line 5344 · raw

@got:Pair(Array<U32>, U32) -> @+i:U32 -> @+fr:U32 -> @+fg:U32 -> @+fb:U32 -> @+fa:U32 -> @+keep:U32 -> Array<U32>

def fill.row source · line 5354 · raw

@fb:Array<U32> -> @n:Nat -> @+i:U32 -> @+front:U32 -> Array<U32>

def paint.from source · line 5365 · raw

@+at:U32 -> @+lo:U32 -> U32

A block's rows or columns within the target: start and count.

def paint.span source · line 5368 · raw

@+at:U32 -> @+size:U32 -> @+lo:U32 -> @+hi:U32 -> U32

def fill.rows.mode source · line 5386 · raw

@opaque:Bool -> @fb:Array<U32> -> @n:Nat -> @+x0:U32 -> @+y:U32 -> @+cols:Nat -> @+t:Target -> @+front:U32 -> Array<U32>

def paint.block.mode source · line 5391 · raw

@direct:Bool -> @fb:Array<U32> -> @+x0:U32 -> @+y0:U32 -> @+rows:Nat -> @+cols:Nat -> @+v:F32 -> @+known:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

def paint.block.known source · line 5401 · raw

@fb:Array<U32> -> @+x0:U32 -> @+y0:U32 -> @+rows:Nat -> @+cols:Nat -> @+v:F32 -> @+known:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

A block whose clips are uniform paints with that limit folded in: nothing when it is zero, the constant front when the brush is solid, the general row without clip reads otherwise; a block a clip edge crosses reads clips per pixel.

def paint.block.some source · line 5404 · raw

@skip:Bool -> @fb:Array<U32> -> @+x0:U32 -> @+y0:U32 -> @+rows:Nat -> @+cols:Nat -> @+v:F32 -> @+known:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

def paint.block.limit source · line 5409 · raw

@clipped:Bool -> @+clips:List<&2, Clip> -> @+x0:U32 -> @+y0:U32 -> @+x1:U32 -> @+y1:U32 -> F32

def paint.ctx.clipped source · line 5414 · raw

@+ctx:PaintCtx -> Bool

def paint.block.if source · line 5434 · raw

@cond:Bool -> @fb:Array<U32> -> @+x0:U32 -> @+y0:U32 -> @+size:U32 -> @+v:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

def paint.tree.if source · line 5449 · raw

@cond:Bool -> @fb:Array<U32> -> @t:0x8ba6f756b9429dce8795c1d22eb97549/cover.CovTree -> @+x0:U32 -> @+y0:U32 -> @+size:U32 -> @+tg:Target -> @+ctx:PaintCtx -> Array<U32>

def paint.run source · line 5459 · raw

@fb:Array<U32> -> @+x0:U32 -> @+x1:U32 -> @+v:F32 -> @+y:U32 -> @+fixed:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

One run of a row: the columns within the target, the clip limit over them (per pixel when a clip edge crosses the run), then the row painter. One run of a row: the columns within the target, the clip limit over them (the box's limit when that is uniform, else read per run and per pixel when a clip edge crosses the run), then the row painter.

def paint.row.if source · line 5472 · raw

@inside:Bool -> @fb:Array<U32> -> @runs:List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.Run> -> @+gx:U32 -> @+y:U32 -> @+fixed:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

def paint.rows.of source · line 5485 · raw

@fb:Array<U32> -> @rows:List<&2, List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.Run>> -> @+gx:U32 -> @+y:U32 -> @+fixed:F32 -> @t:Target -> @+ctx:PaintCtx -> Array<U32>

def paint.solid.row.mode source · line 5492 · raw

@opaque:Bool -> @fb:Array<U32> -> @+i:U32 -> @+cols:Nat -> @+front:U32 -> Array<U32>

A solid brush with a uniform clip limit paints runs straight: the front for full coverage is packed once per shape, a partial run packs its own, and an opaque front is written without a read.

def paint.solid.run.some source · line 5499 · raw

@skip:Bool -> @fb:Array<U32> -> @+bx:U32 -> @+cols:U32 -> @+v:F32 -> @+y:U32 -> @+tx:U32 -> @+ty:U32 -> @+tw:U32 -> @+full:U32 -> @+tr:F32 -> @+tg:F32 -> @+tb:F32 -> @+ta:F32 -> @+limit:F32 -> Array<U32>

The target rectangle and the tint travel as plain numbers through the run loops: a record passed along would be shared and read again at every run.

def paint.solid.run source · line 5506 · raw

@fb:Array<U32> -> @+x0:U32 -> @+x1:U32 -> @+v:F32 -> @+y:U32 -> @+tx:U32 -> @+ty:U32 -> @+tw:U32 -> @+full:U32 -> @+tr:F32 -> @+tg:F32 -> @+tb:F32 -> @+ta:F32 -> @+limit:F32 -> Array<U32>

def paint.solid.row.if source · line 5517 · raw

@inside:Bool -> @fb:Array<U32> -> @runs:List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.Run> -> @+gx:U32 -> @+y:U32 -> @+tx:U32 -> @+ty:U32 -> @+tw:U32 -> @+full:U32 -> @+tr:F32 -> @+tg:F32 -> @+tb:F32 -> @+ta:F32 -> @+limit:F32 -> Array<U32>

def paint.solid.rows source · line 5529 · raw

@fb:Array<U32> -> @rows:List<&2, List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.Run>> -> @+gx:U32 -> @+y:U32 -> @t:Target -> @+full:U32 -> @tint:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+limit:F32 -> Array<U32>

def paint.rows.mode source · line 5534 · raw

@solid:Bool -> @fb:Array<U32> -> @rows:List<&2, List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.Run>> -> @+gx:U32 -> @+gy:U32 -> @+fixed:F32 -> @+tg:Target -> @+ctx:PaintCtx -> Array<U32>

def paint.data source · line 5544 · raw

@d:0x8ba6f756b9429dce8795c1d22eb97549/cover.CovData -> @fb:Array<U32> -> @+gx:U32 -> @+gy:U32 -> @+size:U32 -> @+fixed:F32 -> @+tg:Target -> @+ctx:PaintCtx -> Array<U32>

The clips are read once over the mask's whole box: uniform there (the usual case, a shape inside the viewport clip), that limit serves every run and nothing reads the clips again; zero there paints nothing.

def paint.data.known source · line 5549 · raw

@empty:Bool -> @+known:F32 -> @d:0x8ba6f756b9429dce8795c1d22eb97549/cover.CovData -> @fb:Array<U32> -> @+gx:U32 -> @+gy:U32 -> @+size:U32 -> @+tg:Target -> @+ctx:PaintCtx -> Array<U32>

def paint.data.if source · line 5554 · raw

@present:Bool -> @d:0x8ba6f756b9429dce8795c1d22eb97549/cover.CovData -> @fb:Array<U32> -> @+gx:U32 -> @+gy:U32 -> @+w:U32 -> @+h:U32 -> @+size:U32 -> @+tg:Target -> @+ctx:PaintCtx -> Array<U32>

def paint.cover source · line 5567 · raw

@fb:Array<U32> -> @+cov:Cover -> @+tg:Target -> @+ctx:PaintCtx -> Array<U32>

A shape's coverage mask on the frame grid, painted with its brush.

def paint.fill.if source · line 5571 · raw

@cond:Bool -> @fb:Array<U32> -> @f:Fill -> @+brush:Brush -> @+inv:Matrix -> @+linear:Bool -> @+clips:List<&2, Clip> -> @+tg:Target -> Array<U32>

def paint.stroke.if source · line 5578 · raw

@cond:Bool -> @fb:Array<U32> -> @mesh:StrokeMesh -> @+brush:Brush -> @+inv:Matrix -> @+linear:Bool -> @+clips:List<&2, Clip> -> @+tg:Target -> Array<U32>

def paint.pieces source · line 5588 · raw

@order:U32 -> @fb:Array<U32> -> @+fills:Bool -> @+strokes:Bool -> @ink:Paint<Brush> -> @+inv:Matrix -> @outline:StrokeMesh -> @f:Fill -> @markers:(@_:Array<U32> -> Array<U32>) -> @+linear:Bool -> @+clips:List<&2, Clip> -> @+tg:Target -> Array<U32>

The fill, stroke and markers of a shape in its paint order (see paint.order.first): each arm hands the fill's and the stroke's masks to exactly one painter, so the masks are never shared and walked as copies.

def paint.order.first source · line 5611 · raw

@+order:U32 -> U32

paint-order as three steps: the first piece is order / 2, the other two in ascending order for an even value and descending for an odd one.

def paint.order.second source · line 5614 · raw

@+order:U32 -> U32

def paint.order.third source · line 5620 · raw

@+order:U32 -> U32

def paint.order.of source · line 5626 · raw

@+s:Style -> U32

def paint.markers.at source · line 5630 · raw

@+which:U32 -> @+nodes:List<&2, Scene<Brush>> -> List<&2, Scene<Brush>>

def paint.clips source · line 5633 · raw

@clip:Clip -> @+clips:List<&2, Clip> -> List<&2, Clip>

def comp.factor.got source · line 5640 · raw

@got:Pair(Array<U32>, U32) -> @+mode:U32 -> Pair(Array<U32>, F32)

def comp.factor.if source · line 5645 · raw

@read:Bool -> @mask:Array<U32> -> @+i:U32 -> @+mode:U32 -> Pair(Array<U32>, F32)

The mask factor at index i: one without a mask, else from the mask layer's pixel.

def comp.factor source · line 5650 · raw

@mask:Array<U32> -> @+i:U32 -> @+mode:U32 -> Pair(Array<U32>, F32)

def comp.pixel.mask source · line 5653 · raw

@got:Pair(Array<U32>, F32) -> @fb:Array<U32> -> @layer:Array<U32> -> @+i:U32 -> @+opacity:F32 -> @+px:U32 -> Pair(Array<U32>, Pair(Array<U32>, Array<U32>))

def comp.pixel.layer source · line 5657 · raw

@got:Pair(Array<U32>, U32) -> @fb:Array<U32> -> @mask:Array<U32> -> @+i:U32 -> @+opacity:F32 -> @+mode:U32 -> Pair(Array<U32>, Pair(Array<U32>, Array<U32>))

def comp.pixel.mask.at source · line 5661 · raw

@got:Pair(Array<U32>, F32) -> @fb:Array<U32> -> @layer:Array<U32> -> @+i:U32 -> @+opacity:F32 -> @+px:U32 -> Pair(Array<U32>, Pair(Array<U32>, Array<U32>))

def comp.pixel.layer.at source · line 5665 · raw

@got:Pair(Array<U32>, U32) -> @fb:Array<U32> -> @mask:Array<U32> -> @+i:U32 -> @+j:U32 -> @+opacity:F32 -> @+mode:U32 -> Pair(Array<U32>, Pair(Array<U32>, Array<U32>))

def comp.step2 source · line 5671 · raw

@rest:Pair(Array<U32>, Array<U32>) -> @fb:Array<U32> -> @+i:U32 -> @+j:U32 -> @+opacity:F32 -> @+mode:U32 -> Pair(Array<U32>, Pair(Array<U32>, Array<U32>))

One pixel: the layer's pixel (index j in the layer and mask) scaled by opacity and the mask, over the frame pixel at index i.

def comp.step source · line 5675 · raw

@state:Pair(Array<U32>, Pair(Array<U32>, Array<U32>)) -> @+i:U32 -> @+j:U32 -> @+opacity:F32 -> @+mode:U32 -> Pair(Array<U32>, Pair(Array<U32>, Array<U32>))

def comp.finish source · line 5691 · raw

@state:Pair(Array<U32>, Pair(Array<U32>, Array<U32>)) -> Array<U32>

def comp.start source · line 5696 · raw

@+lo:F32 -> @+limit:U32 -> U32

The pixel range of a device box within the frame: start and count per axis.

def comp.count source · line 5699 · raw

@+lo:F32 -> @+hi:F32 -> @+limit:U32 -> U32

def comp.layer source · line 5706 · raw

@fb:Array<U32> -> @layer:Array<U32> -> @mask:Array<U32> -> @+ft:Target -> @+lt:Target -> @+opacity:F32 -> @+mode:U32 -> Array<U32>

A finished layer (and its mask layer, both on the layer target), scaled by opacity and the mask, over the frame target across the layer's rectangle.

def rcomp.pixel.mask source · line 5711 · raw

@got:Pair(Array<U32>, F32) -> @fb:Array<U32> -> @+i:U32 -> @+opacity:F32 -> @c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+limit:F32 -> Pair(Array<U32>, Array<U32>)

A rendered filter raster, faded by the node's clip, opacity and mask, over the frame.

def rcomp.step source · line 5715 · raw

@state:Pair(Array<U32>, Array<U32>) -> @+x:U32 -> @+y:U32 -> @+ft:Target -> @+lt:Target -> @+raster:Raster -> @+clip:Clip -> @+linear:Bool -> @+opacity:F32 -> @+mode:U32 -> Pair(Array<U32>, Array<U32>)

def rcomp.finish source · line 5732 · raw

@state:Pair(Array<U32>, Array<U32>) -> Array<U32>

def comp.raster source · line 5738 · raw

@fb:Array<U32> -> @mask:Array<U32> -> @+raster:Raster -> @+clip:Clip -> @+ft:Target -> @+lt:Target -> @+linear:Bool -> @+opacity:F32 -> @+mode:U32 -> Array<U32>

A rendered filter raster over the frame target across the layer target's rectangle, faded by the node's clip, opacity and mask (a layer on lt).

def filter.raster source · line 5742 · raw

@effect:FilterEffect -> Raster

def paint.node source · line 5771 · raw

@direct:Bool -> @fb:Array<U32> -> @es:List<&2, Edge> -> @box:Bounds -> @+inv:Matrix -> @+style:Style -> @+opacity:F32 -> @kids:List<&2, Scene<Brush>> -> @id:String -> @ink:Paint<Brush> -> @clip:Clip -> @outline:StrokeMesh -> @fill:Fill -> @maskNodes:List<&2, Scene<Brush>> -> @+maskMode:U32 -> @markerNodes:List<&2, Scene<Brush>> -> @coverage:Bounds -> @+effect:FilterEffect -> @+t:Target -> @+linear:Bool -> @+clips:List<&2, Clip> -> @+inner:List<&2, Clip> -> @+lt:Target -> @again:(@_:List<&2, Scene<Brush>> -> @_:Target -> @_:Bool -> @_:List<&2, Clip> -> @_:Array<U32> -> Array<U32>) -> @more:(@_:List<&2, Scene<Brush>> -> @_:Target -> @_:Bool -> @_:List<&2, Clip> -> @_:Array<U32> -> Array<U32>) -> Array<U32>

A scene painted directly: its pieces in paint order, then its children.

def paint.frame source · line 5792 · raw

@scene:List<&2, Scene<Brush>> -> @+w:U32 -> @+h:U32 -> @+aa:U32 -> Array<U32>

The whole document at w by h device pixels, packed premultiplied RGBA.

def pack.got source · line 5797 · raw

@got:Pair(Array<U32>, U32) -> @+j:U32 -> Array<U32>

def paint.packed source · line 5809 · raw

@scene:List<&2, Scene<Brush>> -> @+w:U32 -> @+h:U32 -> @+aa:U32 -> Array<U32>

The document as packed 0xRRGGBB pixels over white, row-major, w * h entries.

def packed.then source · line 5813 · raw

@-R:Type -> @got:Pair(Array<U32>, U32) -> @next:(@_:Array<U32> -> @_:U32 -> R) -> R

Threads an array through a continuation after one read.

def image source · line 5828 · raw

@+depth:Nat -> @x:U32 -> @y:U32 -> @scene:List<&2, Scene<Brush>> -> @+aa:U32 -> Image

def ppm source · line 5844 · raw

@+w:U32 -> @+h:U32 -> @scene:List<&2, Scene<Brush>> -> @+aa:U32 -> String

def pick.prefer source · line 5850 · raw

@+a:Pick -> @b:Pick -> Pick

def pick.alpha source · line 5854 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> Bool

def pick.node source · line 5858 · raw

@c:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @id:String -> @inv:Matrix -> Pick

def pick.instance source · line 5861 · raw

@+hit:Pick -> @id:String -> @inv:Matrix -> Pick

def pick source · line 5865 · raw

@+scenes:List<&2, Scene<Brush>> -> @+p:Point -> Pick

Unsafe

unsafe transform source · line 86 · raw

@+s:String -> @+m:Matrix -> Matrix

unsafe cubic.go source · line 202 · raw

@+n:Nat -> @+i:F32 -> @+step:F32 -> @+p:Point -> @+a:Point -> @+b:Point -> @+q:Point -> @+prev:Point -> @+edges:List<&2, Edge> -> List<&2, Edge>

unsafe path.args source · line 254 · raw

@num:0xaff2b2d0565125a37b5df94a39451ef8/scan.Number -> @+n:Nat -> @acc:List<&2, F32> -> @+arc:Bool -> @+cmd:U32 -> Params

The numbers of one command, gathered in a loop; n counts those still to read after num. An invalid number ends the whole parse.

unsafe path.run source · line 499 · raw

@ps:Params -> @+cmd:U32 -> @p:Path -> Path

The commands in turn: each step applies the pending command with the numbers just read, then reads the next command's numbers. A non-letter repeats the pending command (SVG's implicit repetition); with none pending it ends the parse.

unsafe color.hex.scan source · line 807 · raw

@hexed:Bool -> @+ch:U32 -> @t:String -> @+acc:U32 -> @+n:U32 -> Pair(U32, U32)

One character at a time, decided one step ahead: hexed says whether ch is a hex digit; the rest is scanned only while digits continue.

unsafe marker.vertices.tail source · line 984 · raw

@xs:List<&2, MarkerSegment> -> @previous:Point -> @+first:Point -> @+endAngle:F32 -> List<&2, MarkerVertex>

unsafe points.clean.go source · line 1194 · raw

@near:Bool -> @+h:Point -> @t:List<&2, Point> -> @+previous:Point -> List<&2, Point>

Repeated points dropped, each decided a step ahead: near says whether h coincides with the point kept before it.

unsafe subpaths.go source · line 1260 · raw

@kind:U32 -> @+ax:F32 -> @+ay:F32 -> @+bx:F32 -> @+by:F32 -> @rest:List<&2, Edge> -> @st:Sub -> List<&2, Subpath>

unsafe dash.values source · line 1335 · raw

@s:String -> @+ref:F32 -> List<&2, F32>

unsafe dash.walk source · line 1371 · raw

@+cursor:DashCursor -> @+all:List<&2, F32> -> @+position:F32 -> @+total:F32 -> List<&2, DashRun>

unsafe segments.at source · line 1676 · raw

@xs:List<&2, Segment> -> @+d:F32 -> @+fallback:Point -> Point

unsafe segments.dir.at source · line 1685 · raw

@xs:List<&2, Segment> -> @+d:F32 -> @+fallback:Point -> Point

unsafe tile.grid source · line 2353 · raw

@+pixels:0x6053821c66ad4107092f3cff65679fc6/image.Pixels -> @+side:U32 -> @+wd:U32 -> @+ht:U32 -> @+w:F32 -> @+h:F32 -> @+q:Point -> @+u:Point -> @+v:Point -> @+grid:U32 -> @n:Nat -> @+i:U32 -> @acc:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

Sum of grid by grid nearest reads spread over the pixel footprint (u, v).

unsafe clip.build source · line 2517 · raw

@fuel:Nat -> @+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+m:Matrix -> @+w:F32 -> @+h:F32 -> @+even:Bool -> @+scale:F32 -> Clip

unsafe use.expand source · line 2793 · raw

@+fuel:Nat -> @+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+ancestors:List<&2, String> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

unsafe sample source · line 2923 · raw

@+scenes:List<&2, Scene<Brush>> -> @+p:Point -> @+paintPoint:Point -> @+back:0x6053821c66ad4107092f3cff65679fc6/image.Color -> @+linear:Bool -> @+limit:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

Pattern scenes are finite compiled subtrees; the callback obscures structural descent.

unsafe marker.instances.loop source · line 3074 · raw

@xs:List<&2, MarkerVertex> -> @+first:Bool -> @+ms:MarkerStyle -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+active:List<&2, String> -> @+width:F32 -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

unsafe compile.work source · line 3142 · raw

@+fuel:Nat -> @work:Work -> @+inherited:Style -> @+m:Matrix -> @+w:F32 -> @+h:F32 -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+root:Bool -> @+active:List<&2, String> -> @+scale:F32 -> List<&2, Scene<Brush>>

unsafe text.lengths source · line 3215 · raw

@s:String -> @+ref:F32 -> @+size:F32 -> List<&2, F32>

unsafe text.path.resolve source · line 3293 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+all:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+w:F32 -> @+h:F32 -> @+root:Bool -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

unsafe text.characters source · line 3403 · raw

@s:String -> @+font:TextFont -> @+frames:List<&2, TextFrame> -> @cursor:TextCursor -> TextLayout

unsafe text.fit.nodes source · line 3465 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+origin:F32 -> @+ratio:F32 -> @+step:F32 -> @+skip:String -> @+count:U32 -> @+fixed:F32 -> TextFit

unsafe text.layout source · line 3524 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+font:TextFont -> @+frames:List<&2, TextFrame> -> @+cursor:TextCursor -> @+w:F32 -> @+h:F32 -> @+onPath:Bool -> TextLayout

unsafe text.expand source · line 3634 · raw

@xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+font:TextFont -> @+w:F32 -> @+h:F32 -> @+root:Bool -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

unsafe text.paint.take source · line 3652 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+acc:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> TextPaintRun

unsafe text.paint.group source · line 3671 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

unsafe context.scenes source · line 3743 · raw

@+xs:List<&2, Scene<Brush>> -> @+paint:Paint<Brush> -> @+parent:Matrix -> List<&2, Scene<Brush>>

unsafe image.svg.wellformed source · line 3759 · raw

@+tokens:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Token> -> @+stack:List<&2, String> -> @+seen:Bool -> Bool

unsafe image.svg.utf8.tail source · line 3782 · raw

@+data:0xb4c178c822e0e37d625a581d728097d3/bytes.Bytes -> @+at:U32 -> @left:Nat -> @+acc:U32 -> @+minimum:U32 -> @+step:U32 -> ImageCodepoint

unsafe image.svg.byte.text source · line 3801 · raw

@+data:0xb4c178c822e0e37d625a581d728097d3/bytes.Bytes -> @+at:U32 -> @+acc:String -> String

unsafe image.svg.expand source · line 3900 · raw

@+fuel:Nat -> @+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+w:F32 -> @+h:F32 -> List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element>

unsafe raster.depth source · line 4015 · raw

@+size:U32 -> @+side:U32 -> @+depth:Nat -> Nat

unsafe cover.tile.pixels source · line 4244 · raw

@depth:Nat -> @+x:U32 -> @+y:U32 -> @+frame:Raster -> @+nodes:List<&2, Scene<Brush>> -> @+box:Bounds -> @+w:F32 -> @+h:F32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Pixels

unsafe reduce.cols source · line 4271 · raw

@+pixels:0x6053821c66ad4107092f3cff65679fc6/image.Pixels -> @+side:U32 -> @+x:U32 -> @+y:U32 -> @+lo:F32 -> @+hi:F32 -> @+wy:F32 -> @n:Nat -> @acc:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

unsafe reduce.rows source · line 4277 · raw

@+pixels:0x6053821c66ad4107092f3cff65679fc6/image.Pixels -> @+side:U32 -> @+x:U32 -> @+y:U32 -> @+x0:F32 -> @+x1:F32 -> @+y0:F32 -> @+y1:F32 -> @+nx:Nat -> @n:Nat -> @acc:0x6053821c66ad4107092f3cff65679fc6/image.Color -> 0x6053821c66ad4107092f3cff65679fc6/image.Color

unsafe reduce.pixels source · line 4295 · raw

@depth:Nat -> @+x:U32 -> @+y:U32 -> @+pixels:0x6053821c66ad4107092f3cff65679fc6/image.Pixels -> @+side:U32 -> @+w:U32 -> @+h:U32 -> @+fx:F32 -> @+fy:F32 -> @+rw:U32 -> @+rh:U32 -> 0x6053821c66ad4107092f3cff65679fc6/image.Pixels

unsafe cover.scenes source · line 4409 · raw

@xs:List<&2, Scene<Brush>> -> @+frame:Raster -> @+sub:U32 -> @+trees:Bool -> List<&2, Scene<Brush>>

Scenes painted directly keep rows-only fill masks (trees false); scenes sampled per pixel (pattern tiles, filter and mask rasters) need trees.

unsafe filter.chain source · line 5012 · raw

@+xs:List<&2, 0x823f0d97991344accc44fe457a33356a/xml.Element> -> @+format:Raster -> @+source:FilterInput -> @+previous:FilterInput -> @+results:List<&2, FilterResult> -> @+region:Bounds -> @+units:Matrix -> @+viewport:Point -> @+aa:U32 -> FilterInput

unsafe prepare.scenes source · line 5094 · raw

@+xs:List<&2, Scene<Brush>> -> @+space:Matrix -> @+aa:U32 -> List<&2, Scene<Brush>>

unsafe paint.row source · line 5327 · raw

@fb:Array<U32> -> @n:Nat -> @+x:U32 -> @+y:U32 -> @+v:F32 -> @+known:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

unsafe paint.rows source · line 5333 · raw

@fb:Array<U32> -> @n:Nat -> @+x0:U32 -> @+y:U32 -> @+cols:Nat -> @+v:F32 -> @+known:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

unsafe fill.row.pre source · line 5349 · raw

@fb:Array<U32> -> @n:Nat -> @+i:U32 -> @+fr:U32 -> @+fg:U32 -> @+fbl:U32 -> @+fa:U32 -> @+keep:U32 -> Array<U32>

unsafe fill.rows source · line 5359 · raw

@fb:Array<U32> -> @n:Nat -> @+x0:U32 -> @+y:U32 -> @+cols:Nat -> @+t:Target -> @+front:U32 -> Array<U32>

unsafe set.row source · line 5375 · raw

@fb:Array<U32> -> @n:Nat -> @+i:U32 -> @+front:U32 -> Array<U32>

An opaque front replaces the pixels outright, no read and no blend.

unsafe set.rows source · line 5381 · raw

@fb:Array<U32> -> @n:Nat -> @+x0:U32 -> @+y:U32 -> @+cols:Nat -> @+t:Target -> @+front:U32 -> Array<U32>

unsafe paint.block source · line 5422 · raw

@fb:Array<U32> -> @+x0:U32 -> @+y0:U32 -> @+size:U32 -> @+v:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

One uniform block of a mask, clipped to the target. A block a clip edge crosses is split in four down to eight pixels, so the per-pixel clip reads stay near the edge and the rest of the block still fills at once.

unsafe paint.tree source · line 5440 · raw

@fb:Array<U32> -> @t:0x8ba6f756b9429dce8795c1d22eb97549/cover.CovTree -> @+x0:U32 -> @+y0:U32 -> @+size:U32 -> @+tg:Target -> @+ctx:PaintCtx -> Array<U32>

unsafe paint.runs source · line 5467 · raw

@fb:Array<U32> -> @runs:List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.Run> -> @+gx:U32 -> @+y:U32 -> @+fixed:F32 -> @+t:Target -> @+ctx:PaintCtx -> Array<U32>

unsafe paint.rows.go source · line 5479 · raw

@fb:Array<U32> -> @rows:List<&2, List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.Run>> -> @+gx:U32 -> @+y:U32 -> @+fixed:F32 -> @+tx:U32 -> @+ty:U32 -> @+tw:U32 -> @+th:U32 -> @+ctx:PaintCtx -> Array<U32>

Rows of runs painted straight into the target, no tree needed.

unsafe paint.solid.runs source · line 5512 · raw

@fb:Array<U32> -> @runs:List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.Run> -> @+gx:U32 -> @+y:U32 -> @+tx:U32 -> @+ty:U32 -> @+tw:U32 -> @+full:U32 -> @+tr:F32 -> @+tg:F32 -> @+tb:F32 -> @+ta:F32 -> @+limit:F32 -> Array<U32>

unsafe paint.solid.rows.go source · line 5523 · raw

@fb:Array<U32> -> @rows:List<&2, List<&2, 0x8ba6f756b9429dce8795c1d22eb97549/cover.Run>> -> @+gx:U32 -> @+y:U32 -> @+tx:U32 -> @+ty:U32 -> @+tw:U32 -> @+th:U32 -> @+full:U32 -> @+tr:F32 -> @+tg:F32 -> @+tb:F32 -> @+ta:F32 -> @+limit:F32 -> Array<U32>

unsafe comp.row source · line 5680 · raw

@state:Pair(Array<U32>, Pair(Array<U32>, Array<U32>)) -> @n:Nat -> @+i:U32 -> @+j:U32 -> @+opacity:F32 -> @+mode:U32 -> Pair(Array<U32>, Pair(Array<U32>, Array<U32>))

unsafe comp.rows source · line 5686 · raw

@state:Pair(Array<U32>, Pair(Array<U32>, Array<U32>)) -> @n:Nat -> @+y:U32 -> @+x0:U32 -> @+cols:Nat -> @+ft:Target -> @+lt:Target -> @+opacity:F32 -> @+mode:U32 -> Pair(Array<U32>, Pair(Array<U32>, Array<U32>))

unsafe rcomp.row source · line 5721 · raw

@state:Pair(Array<U32>, Array<U32>) -> @n:Nat -> @+x:U32 -> @+y:U32 -> @+ft:Target -> @+lt:Target -> @+raster:Raster -> @+clip:Clip -> @+linear:Bool -> @+opacity:F32 -> @+mode:U32 -> Pair(Array<U32>, Array<U32>)

unsafe rcomp.rows source · line 5727 · raw

@state:Pair(Array<U32>, Array<U32>) -> @n:Nat -> @+y:U32 -> @+x0:U32 -> @+cols:Nat -> @+ft:Target -> @+lt:Target -> @+raster:Raster -> @+clip:Clip -> @+linear:Bool -> @+opacity:F32 -> @+mode:U32 -> Pair(Array<U32>, Array<U32>)

unsafe paint.layered source · line 5760 · raw

@rendered:Bool -> @fb:Array<U32> -> @es:List<&2, Edge> -> @box:Bounds -> @inv:Matrix -> @style:Style -> @+opacity:F32 -> @kids:List<&2, Scene<Brush>> -> @id:String -> @ink:Paint<Brush> -> @clip:Clip -> @outline:StrokeMesh -> @fill:Fill -> @maskNodes:List<&2, Scene<Brush>> -> @+maskMode:U32 -> @markerNodes:List<&2, Scene<Brush>> -> @coverage:Bounds -> @effect:FilterEffect -> @+t:Target -> @+lt:Target -> @+linear:Bool -> @+clips:List<&2, Clip> -> @again:(@_:List<&2, Scene<Brush>> -> @_:Target -> @_:Bool -> @_:List<&2, Clip> -> @_:Array<U32> -> Array<U32>) -> @more:(@_:List<&2, Scene<Brush>> -> @_:Target -> @_:Bool -> @_:List<&2, Clip> -> @_:Array<U32> -> Array<U32>) -> Array<U32>

A scene with an effect, a mask or partial opacity is painted into a layer of its own first (the scene without those, over a fresh layer), then composited; a filtered scene's raster stands in for the layer.

unsafe paint.scenes source · line 5779 · raw

@fb:Array<U32> -> @xs:List<&2, Scene<Brush>> -> @+t:Target -> @+linear:Bool -> @+clips:List<&2, Clip> -> Array<U32>

unsafe pack.loop source · line 5803 · raw

@fb:Array<U32> -> @n:Nat -> @+j:U32 -> Array<U32>

Every pixel over white, in place, as the 0xRRGGBB the outputs use.

unsafe image.of source · line 5819 · raw

@a:Array<U32> -> @depth:Nat -> @+x:U32 -> @+y:U32 -> @+side:U32 -> @next:(@_:Array<U32> -> @_:Image -> Image) -> Image

The window image: a quadtree over a 2^depth square, read from the packed pixels.

unsafe ppm.cols source · line 5833 · raw

@a:Array<U32> -> @n:Nat -> @+j:U32 -> @next:(@_:Array<U32> -> @_:String -> String) -> String

unsafe ppm.rows source · line 5839 · raw

@a:Array<U32> -> @n:Nat -> @+y:U32 -> @+w:U32 -> @next:(@_:Array<U32> -> @_:String -> String) -> String