Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide: Hide elements #376

Merged
merged 1 commit into from
Dec 10, 2023
Merged

hide: Hide elements #376

merged 1 commit into from
Dec 10, 2023

Conversation

johannes-wolf
Copy link
Member

@johannes-wolf johannes-wolf commented Dec 4, 2023

This adds a function for hiding elements.
Hidden elements act like normal elements, despite not getting rendered and not producing a bounding box.

This can be handy for calculating intersections between elements that should not get drawn, which is currently only possible by using the internal API.

@fenjalien, I think we should add some Typst native functions back as aliases in draw.typ:

#let typst-line = line
#let typst-hide = hide
...

Makes #234 at least possible. A line(..) API will follow in a separate PR.

@johannes-wolf johannes-wolf added this to the 0.2 milestone Dec 4, 2023
@johannes-wolf johannes-wolf force-pushed the hide-elements branch 3 times, most recently from 5fd4348 to 1d0f6f8 Compare December 10, 2023 00:16
Copy link
Member

@fenjalien fenjalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment about hidden paths to merge-path's docs as well!

src/draw/grouping.typ Outdated Show resolved Hide resolved
@johannes-wolf johannes-wolf merged commit 6ae4989 into 0.2.0 Dec 10, 2023
2 checks passed
@johannes-wolf johannes-wolf deleted the hide-elements branch December 10, 2023 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants