typst/tests/typ/func-image-fit.typ
Laurenz ba3d43f7b2 Refresh function call and dictionary syntax
- No colon between function name and arguments, just whitespace
- "Named" arguments (previously "keyword" arguments) use colon instead of equals sign
2020-12-27 20:45:20 +01:00

24 lines
536 B
XML

// Test configuring the size and fitting behaviour of images.
// Fit to width of page.
[image "res/rhino.png"]
// Fit to height of page.
[page width: 270pt][
[image "res/rhino.png"]
]
// Set width explicitly.
[image "res/rhino.png", width: 50pt]
// Set height explicitly.
[image "res/rhino.png", height: 50pt]
// Set width and height explicitly and force stretching.
[image "res/rhino.png", width: 25pt, height: 50pt]
// Make sure the bounding-box of the image is correct.
[align bottom, right][
[image "res/tiger.jpg"]
]