Skip to content

add-line's behavior does not match the documentation #570

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

Open
schanzer opened this issue Jan 7, 2025 · 2 comments
Open

add-line's behavior does not match the documentation #570

schanzer opened this issue Jan 7, 2025 · 2 comments
Labels

Comments

@schanzer
Copy link

schanzer commented Jan 7, 2025

According to the documentation, these two lines of code should have the line starting at the same coord, and ending at a different place. That doesn't happen.

add-line(circle(20, "outline", "maroon"), 0, 40, 40, 0, "orange")
add-line(circle(20, "outline", "maroon"), 0, 40, 20, 0, "orange")

@schanzer schanzer added the bug label Jan 9, 2025
@asolove
Copy link
Contributor

asolove commented Feb 25, 2025

From a bit more playing around with this, it seems that what we're doing is something like drawing the first picture, then drawing a line as a second picture, and then overlaying them at the center point of the two images.

This example might make it clearer:

Image

The second line takes up less space in x and y directions, so the line's x1=0 and y1=0 isn't the same spot relative to the circle as the first line.

@blerner
Copy link
Member

blerner commented Feb 25, 2025

Pretty much, yeah. #580 has a (not-yet-tested) fix

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants