Skip to content
New issue

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

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

Already on GitHub? # to your account

vello_toy: Color lines according to their winding sign #846

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

tomcur
Copy link
Member

@tomcur tomcur commented Mar 11, 2025

#845 removed line-tile intersections from the debug rendering, as these are no longer present in the internal representation.

However, that also removed a way to see whether lines are directed upwards or downwards, which is important to understand their effect on winding.

This proposes coloring the lines according to their orientation: lines oriented upwards add to winding and are colored green. Lines oriented downwards subtract from winding and are colored red. Horizontal lines don't affect winding, and will with future changes likely not generate any tiles at all. These are colored grey.

An example of what that looks like:

cargo run --bin debug -- --path "M 5 5 L 40 23 L 20 43.5 L 1 43.5 Z"  --stages ls,ta

debug

#845 removed line-tile
intersections from the debug rendering, as these are no longer present
in the internal representation.

However, that also removed a way to see whether lines are directed
upwards or downwards, which is important to understand their effect on
winding.

This proposes coloring the lines according to their orientation: lines
oriented upwards add to winding and are colored green. Lines oriented
downwards subtract from winding and are colored red. Horizontal lines
don't affect winding, and will with future changes likely not generate
any tiles at all. These are colored grey.
@tomcur tomcur requested a review from LaurenzV March 11, 2025 11:09
@tomcur tomcur added this pull request to the merge queue Mar 11, 2025
Merged via the queue into main with commit bb6fe50 Mar 11, 2025
17 checks passed
@tomcur tomcur deleted the push-kwklpkzuyokl branch March 11, 2025 11:36
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants