typst/tests/typ/image-fit.typ
Laurenz 81e80ecfba Test [page] function 📕
- Make page break behaviour more consistent
- Allow skipping reference image testing for single tests with `// compare-ref: false` (useful for tests which only check error messages)
2020-12-17 00:20:27 +01:00

24 lines
539 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"]
]