openlilylib / analysis

Graphical highlighting of musical analysis with GNU LilyPond
GNU General Public License v3.0
5 stars 3 forks source link

Integrate make-frame-stencil (makeDeltaSpan) and makeDeltaFrame #5

Closed uliska closed 10 months ago

uliska commented 7 years ago

It is unacceptable to have these more or less redundant functions side-by-side.

The solution is:

This will also make it easier to have the border grow outwards and (maybe) to have the inner polygon not rounded if there is a border.

KlausBlum commented 6 years ago

Done. New branch "integrate-MakeDeltaFrame" is ready for revision.

I could not completely remove the double execution of calculations, because the inner polygon needs a different order (Points must be given in clockwise order - TODO: Test if this is really necessary). At least, calculations are only executed if a polygon will be drawn.

Now it is possible to have "empty" borders without inner polygon. HOWEVER, border-radius > 0 will only lead to usable results if there is no border (i.e. only inner polygon). Therefore I would recommend to set the default value to zero. This also prevents the problems with broken frames or when working with open-on-top / open-on-bottom.

Okay... I'm open to opinions and suggestions.

KlausBlum commented 6 years ago

Update: No need to stick to clockwise order. With the lastest commit, all redundant code is removed.

KlausBlum commented 6 years ago

Another update: With the latest commits, it's again possible to have border-radius > 0. ly:round-filled-polygon has an optional parameter extroversion that prevents the ugly distortions when set to zero. Nevertheless, I'd still recommend to have zero as default value.

Any thoughts?

KlausBlum commented 10 months ago

Merged 21.06.2020