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.
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
Anglepic #1369
base: master
Are you sure you want to change the base?
Anglepic #1369
Changes from 2 commits
699d7ac
e7e1bf8
6bd4d90
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of removing, how about rewrite it to
to document the extended syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, but it needs to be
``|1,1|''
then because the()
are inserted by the pic's setup code. Sopic […] {angle = {A--1,1--B.south west}}
orpic […] {angle = A--{1,1}--B.south west}
would be valid syntax.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right.
Then this syntax seems a bit more strange. Is a key-value interface needed here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't mind one. I always put the coordinates in the wrong order anyway. :D
But is it so strange? Sure, in most cases, the
()
are used to indicate something is a coordinate (andbaseline
et al uses it to decide between a value and a coordinate).But there are also many that don't use the
()
:(intersection of A--B and C--D)
syntax where additional parentheses are missing (it even has the--
)(A |- B)
(and not((A) |- (B))
=({(A)} |- {(B)})
) as well asbelow = of A
.They would all also allow
1, 1
, the latter only with{}
, of course.We can check for
--
– twice even – and use the old syntax (both for backwards compatibility and for the simple syntax), otherwise usestart direction = (A), center = {(1, 1)}, end direction = (B.south west)
. I'd would even be as fancy as allowingstart direction = (A), center = {(1, 1)}, delta angle=60
. (But that can give weird results with xyz coordinate systems whose axes don't align with the canvas coordinate system. Thearc
/circle
path operators solve this by choosing one or the other by looking whether the radii have a unit.)The advantage of a key-value interface would be that it allows to set, say, a center coordinate for multiple angles.