M7: home and moon icon fixes (#110)

The home icon's roof stays centred (unhinted outline) and its floor stops at the door; the moon's arcs stop short of the cusp so the tips no longer fold.
This commit is contained in:
BFlat 2026-10-11 10:05:49 +07:00 committed by GitHub
parent 08d91869cb
commit 19343f5331
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -718,7 +718,8 @@ fn draw(p: &P, icon: Icon) {
}
Play => p.fill(&[(4.5, 2.5), (13.5, 8.0), (4.5, 13.5)]),
Home => {
p.poly(&[(3.5, 13.5), (3.5, 7.0), (8.0, 2.8), (12.5, 7.0), (12.5, 13.5)], true);
// Unhinted so the roof's peak stays centred; the floor stops at the door.
p.path(&[(6.5, 13.5), (3.5, 13.5), (3.5, 7.0), (8.0, 2.8), (12.5, 7.0), (12.5, 13.5), (9.5, 13.5)], false);
p.poly(&[(6.5, 13.5), (6.5, 9.5), (9.5, 9.5), (9.5, 13.5)], false);
}
Bell => {
@ -825,9 +826,10 @@ fn draw(p: &P, icon: Icon) {
StrokeIcon => p.rect(2.5, 2.5, 13.5, 13.5, 2.0),
Fill => p.fill_rect(2.0, 2.0, 14.0, 14.0, 2.0),
Moon => {
// A crescent: the outer rim, then the shadowing circle's edge back.
let mut m: Vec<(f32, f32)> = arc_pts(8.0, 8.0, 5.5, 0.166, TAU - 1.737).collect();
m.extend(arc_pts(11.0, 5.0, 4.6, -2.586, 1.016 - TAU));
// A crescent: the outer rim, then the shadowing circle's edge back. Both arcs stop short
// of where the circles meet, so each tip is two blunt joins (a single cusp join folds).
let mut m: Vec<(f32, f32)> = arc_pts(8.0, 8.0, 5.5, 0.166 + 0.12, TAU - 1.737 - 0.12).collect();
m.extend(arc_pts(11.0, 5.0, 4.6, -2.586 - 0.18, 1.016 - TAU + 0.18));
p.path(&m, true);
}
Undo | Redo => {