Skip to content

Fixing some quirky slur rendering #24939

Answered by mike-spa
RhinoHaggis asked this question in Q&A
Discussion options

You must be logged in to vote

@RhinoHaggis the slur is defined by a Bezier curve. To be more precise, an outer bezier curve, and an inner bezier curve. The two curves share the same start and end points, but split in the middle as the inner curve has a lower shoulder height. The painter then fills the region between the two curves and that gives us the tapered shape (thick in the middle, thin at the endpoints). This isn't perfect, and it certainly won't work for arbitrary shapes if you go crazy with the shoulder points, but it's also very simple and efficient and it works for all of our reasonable use cases, so I don't think it's worth overengineering that aspect.

You are almost certainly correct about the arc tangent…

Replies: 7 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@RhinoHaggis
Comment options

@cbjeukendrup
Comment options

@RhinoHaggis
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@RhinoHaggis
Comment options

@RhinoHaggis
Comment options

Answer selected by mike-spa
Comment options

You must be logged in to vote
4 replies
@cbjeukendrup
Comment options

@RhinoHaggis
Comment options

@RhinoHaggis
Comment options

@RhinoHaggis
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants