diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-16 17:56:23 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-16 17:56:36 +0200 |
| commit | a741bd6b83d1e374c8218b5439e26522499cc4ae (patch) | |
| tree | 796ef8b8ae2186a082f37a2aa4732c9bba7d2bdf /tests/typ/graphics | |
| parent | 6536e9e069616b862ebb774c7bef1b886c069350 (diff) | |
Absolute paths
Diffstat (limited to 'tests/typ/graphics')
| -rw-r--r-- | tests/typ/graphics/image.typ | 24 | ||||
| -rw-r--r-- | tests/typ/graphics/transform.typ | 4 |
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/typ/graphics/image.typ b/tests/typ/graphics/image.typ index 8817713f..e64b6c45 100644 --- a/tests/typ/graphics/image.typ +++ b/tests/typ/graphics/image.typ @@ -4,7 +4,7 @@ // Test loading different image formats. // Load an RGBA PNG image. -#image("../../res/rhino.png") +#image("/res/rhino.png") // Load an RGB JPEG image. #set page(height: 60pt) @@ -14,14 +14,14 @@ // Test configuring the size and fitting behaviour of images. // Set width and height explicitly. -#image("../../res/rhino.png", width: 30pt) -#image("../../res/rhino.png", height: 30pt) +#image("/res/rhino.png", width: 30pt) +#image("/res/rhino.png", height: 30pt) // Set width and height explicitly and force stretching. -#image("../../res/monkey.svg", width: 100%, height: 20pt, fit: "stretch") +#image("/res/monkey.svg", width: 100%, height: 20pt, fit: "stretch") // Make sure the bounding-box of the image is correct. -#align(bottom + right, image("../../res/tiger.jpg", width: 40pt)) +#align(bottom + right, image("/res/tiger.jpg", width: 40pt)) --- // Test all three fit modes. @@ -30,9 +30,9 @@ columns: (1fr, 1fr, 1fr), rows: 100%, gutter: 3pt, - image("../../res/tiger.jpg", width: 100%, height: 100%, fit: "contain"), - image("../../res/tiger.jpg", width: 100%, height: 100%, fit: "cover"), - image("../../res/monkey.svg", width: 100%, height: 100%, fit: "stretch"), + image("/res/tiger.jpg", width: 100%, height: 100%, fit: "contain"), + image("/res/tiger.jpg", width: 100%, height: 100%, fit: "cover"), + image("/res/monkey.svg", width: 100%, height: 100%, fit: "stretch"), ) --- @@ -40,18 +40,18 @@ #set page(height: 60pt) Stuff \ Stuff -#image("../../res/rhino.png") +#image("/res/rhino.png") --- // Test baseline. -A #image("../../res/tiger.jpg", height: 1cm, width: 80%) B +A #image("/res/tiger.jpg", height: 1cm, width: 80%) B --- // Test advanced SVG features. -#image("../../res/pattern.svg") +#image("/res/pattern.svg") --- -// Error: 8-29 file not found +// Error: 8-29 file not found (searched at typ/graphics/path/does/not/exist) #image("path/does/not/exist") --- diff --git a/tests/typ/graphics/transform.typ b/tests/typ/graphics/transform.typ index e0679306..5d2a1729 100644 --- a/tests/typ/graphics/transform.typ +++ b/tests/typ/graphics/transform.typ @@ -31,13 +31,13 @@ nor #xetex! // Test combination of scaling and rotation. #set page(height: 80pt) #align(center + horizon, - rotate(20deg, scale(70%, image("../../res/tiger.jpg"))) + rotate(20deg, scale(70%, image("/res/tiger.jpg"))) ) --- // Test setting rotation origin. #rotate(10deg, origin: top + left, - image("../../res/tiger.jpg", width: 50%) + image("/res/tiger.jpg", width: 50%) ) --- |
