Skip to content

Add a skew function - #4803

Merged
laurmaedje merged 4 commits into
typst:mainfrom
Bzero:skew_transform
Sep 2, 2024
Merged

laurmaedje merged 4 commits into
typst:mainfrom
Bzero:skew_transform

Conversation

@Bzero

@Bzero Bzero commented Aug 21, 2024

Copy link
Copy Markdown

This PR addresses issue #2749 and adds a skew transformation function.

The function takes horizontal and/or vertical skewing angles ax and ay to skew the content in the horizontal and vertical directions. If only one angle is given it is taken as the horizontal angle as I would think this will be the more common use case of this function. The remaining arguments origin and reflow behave similar to the other transformation functions.

I refrained from introducing the vscale parameter present in the example in #2749 to keep the transformation more atomic and since scale can be easily used to scale the content after skewing.

Comment thread crates/typst/src/layout/transform.rs Resolved
Comment thread crates/typst/src/layout/transform.rs Resolved
Comment thread crates/typst/src/layout/transform.rs Resolved
Comment thread tests/suite/layout/transform.typ Resolved
Comment thread tests/suite/layout/transform.typ Resolved
@laurmaedje
laurmaedje added this pull request to the merge queue Sep 2, 2024
@laurmaedje

Copy link
Copy Markdown
Member

Thank you, looking great!

Merged via the queue into typst:main with commit 95740ac Sep 2, 2024
@laurmaedje laurmaedje mentioned this pull request Sep 2, 2024
@Bzero

Bzero commented Sep 2, 2024

Copy link
Copy Markdown
Author

Welcome!

@Bzero
Bzero deleted the skew_transform branch September 2, 2024 19:18
Dikluwe pushed a commit to Dikluwe/typst-crystalline that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants