smallpond

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/smallpond
Log | Files | Refs | README | LICENSE

commit 482c0f4585e67389cd643df5de640274ee195c96
parent 2291634ffe2aedd6eb1c701f5a9f4392603eae78
Author: Nihal Jere <nihal@nihaljere.xyz>
Date:   Sat, 22 Oct 2022 00:44:18 -0500

fix stemdown flag drawing

Diffstat:
Msmallpond.lua | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/smallpond.lua b/smallpond.lua @@ -472,7 +472,7 @@ local staff3ify = function(el, staff) else el.stemx = rx + .5 + preoffset el.stemy = lowheight + el.stemlen*em - local stem = {kind="line", t=1, x1=el.stemx, y1=lowheight + .168*em, x2=el.stemx, y2=lowheight + el.stemlen*em} + local stem = {kind="line", t=1, x1=el.stemx, y1=lowheight + .168*em, x2=el.stemx, y2=highheight + el.stemlen*em} el.stem = stem table.insert(staff3[staff], stem) end @@ -480,7 +480,8 @@ local staff3ify = function(el, staff) if el.length == 8 and el.beamed == 0 then if el.stemdir == 1 then - table.insert(staff3[staff], {kind="glyph", glyph=Glyph["flag8thDown"], x=preoffset + rx, y=lowheight + 3.5*em}) + local fx, fy = glyph_extents(Glyph["flag8thDown"]) + table.insert(staff3[staff], {kind="glyph", glyph=Glyph["flag8thDown"], x=preoffset + rx, y=highheight + 3.5*em}) else -- TODO: move glyph extents to a precalculated table or something local fx, fy = glyph_extents(Glyph["flag8thUp"])