Repository navigation
Path support - #536
Merged
Merged
Path support#536
Conversation
Closed
Closed
laurmaedje
reviewed
Apr 4, 2023
laurmaedje
left a comment
Member
There was a problem hiding this comment.
just some minor nits and a remark about the default stroke. also: could you run cargo fmt and wrap doc comments at column 80? (I know, I should check this in CI if I want it ...)
Contributor
Author
|
Sure, I'll do all that. Can't do that today though, I'll do it tomorrow |
Closed
Dikluwe
pushed a commit
to Dikluwe/typst-crystalline
that referenced
this pull request
Sep 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #333
Related to #260
This PR adds support for
path, a function much likepolygon. The main difference is that it is not always closed, and that there is curvature support.Every vertex can be written in one of three ways:
(10pt, 10pt)or((10pt, 10pt))makes a point who's control points are on itself((10pt, 10pt), (10pt, 0pt))makes a point who's arriving control point (when the line goes towards this point) is20pt, 10ptand who's leaving control point is0pt, 10pt(the same point mirrored through the vertex itself)((10pt, 10pt), (10pt, 0pt), (20pt, 0pt))makes a point who's arriving control point is20pt, 10ptand who's leaving control point is30pt, 10ptThis is not an incredible API, but it's consistent and users can create (or it can be part of the standard library) better methods over it, such as more svg-like controls (with curveto, moveto, and such).