Expand description
Measurements as JSON, from generators as a project holds them: the one form the wasm binding and the Python package return.
Enums§
- Measure
Error - Why a generator could not be measured.
Functions§
- measure_
layout_ json - Where each node of the layout generator
generator_json, as a project holds it, lies on awidthbyheightpicture at picture timetime(crate::measure_layout), as JSON{ nodes }: each node in preorder as{ at, border, content, overflow, lineCount, baselines }, its boxes in fractions of the picture,lineCountnullfor a node without text andbaselines({ first, last }, fractions of the picture height)nullfor a node without text or with empty text.canvasis the project canvas its pixels are pixels of: the picture’s size whenNone. - measure_
text_ json - Where the text generator
generator_json, as a project holds it, lies on awidthbyheightcanvas (crate::measure_text), as JSON{ layout, content, ink, lineCount, baselines }: each a{ left, top, right, bottom }rectangle in fractions of the canvas,inknullwhen the text draws nothing, andbaselines{ first, last }in fractions of the canvas height.