diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-29 13:37:25 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-29 14:18:13 +0100 |
| commit | 0efe669278a5e1c3f2985eba2f3360e91159c54a (patch) | |
| tree | 502712857c48f0decb5e698257c0a96d358a436e /tests/typ/layout/transform.typ | |
| parent | 836692e73cff0356e409a9ba5b4887b86809d4ca (diff) | |
Reorganize library and tests
Diffstat (limited to 'tests/typ/layout/transform.typ')
| -rw-r--r-- | tests/typ/layout/transform.typ | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/typ/layout/transform.typ b/tests/typ/layout/transform.typ new file mode 100644 index 00000000..2dde626b --- /dev/null +++ b/tests/typ/layout/transform.typ @@ -0,0 +1,49 @@ +// Test transformations. + +--- +// Test creating the TeX and XeTeX logos. +#let size = 11pt +#let tex = [{ + [T] + h(-0.14 * size) + move(dy: 0.22 * size)[E] + h(-0.12 * size) + [X] +}] + +#let xetex = { + [X] + h(-0.14 * size) + scale(x: -100%, move(dy: 0.26 * size)[E]) + h(-0.14 * size) + [T] + h(-0.14 * size) + move(dy: 0.26 * size)[E] + h(-0.12 * size) + [X] +} + +#set text("Latin Modern Roman", size) +Neither #tex, \ +nor #xetex! + +--- +// Test combination of scaling and rotation. +#set page(height: 80pt) +#align(center + horizon, + rotate(20deg, scale(70%, image("/res/tiger.jpg"))) +) + +--- +// Test setting rotation origin. +#rotate(10deg, origin: top + left, + image("/res/tiger.jpg", width: 50%) +) + +--- +// Test setting scaling origin. +#let r = rect(width: 100pt, height: 10pt, fill: forest) +#set page(height: 65pt) +#scale(r, x: 50%, y: 200%, origin: left + top) +#scale(r, x: 50%, origin: center) +#scale(r, x: 50%, y: 200%, origin: right + bottom) |
