Registry / Framework

framework · v0.1.0
Lapwing
Preflight fixed-line document pagination with indivisible paragraphs.
Use Lapwing
use vendor::lapwing::lapwing;
Run the example
nest demo lapwing@0.1.0
blyxc native-run lapwing-demo/main.blyx
Example source and expected output
use vendor::lapwing::lapwing;
fn main() {
let blocks = [4, 6, 3];
let paper = 120.0;
let top = 10.0;
let bottom = 10.0;
let line = 10.0;
let result = lapwing_paginate(blocks, paper, top, bottom, line);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
2
3
7
10
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 86a0f09bae | b1bc3467a1fe5500bbd2835c1b45761a7e3b7dba9e38e5aff28677ab96a03301 |