summaryrefslogtreecommitdiff
path: root/tests/typ/func-image-fit.typ
diff options
context:
space:
mode:
Diffstat (limited to 'tests/typ/func-image-fit.typ')
-rw-r--r--tests/typ/func-image-fit.typ23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/typ/func-image-fit.typ b/tests/typ/func-image-fit.typ
new file mode 100644
index 00000000..eca7c1e4
--- /dev/null
+++ b/tests/typ/func-image-fit.typ
@@ -0,0 +1,23 @@
+// 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"]
+]