Skip to content

feat(pdf): leave rest-only measures blank for handwriting (#62) - #63

Open
loootte wants to merge 1 commit into
mainfrom
feat/pdf-blank-rest-measures
Open

loootte wants to merge 1 commit into
mainfrom
feat/pdf-blank-rest-measures

Conversation

@loootte

@loootte loootte commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Closes #62

Summary

PDF export leaves a measure's melody row empty when every slot is a rest (0), so the printed page can be filled in by hand.

Behavior

  • PDF only (ScoreLayoutOptions.LeaveRestOnlyMeasuresBlank). Editor canvas still draws 0.
  • Blanked: melody digits, duration underlines, ornaments, ties that attach to that measure
  • Kept: bar lines; chord markers and lyrics if present
  • A measure with any sounding melody note (including simultaneous chord tones) is drawn normally
  • Empty measures are treated as rest-only

Tests

  • MeasureRestService unit tests
  • PDF bitmap: rest-only melody row has almost no ink; neighboring note measure still draws
  • Editor bitmap still draws rest zeros

dotnet test JianpuEditor.sln -c Debug — 260 passed

Please review and confirm merge; I will not merge until you say so.

PDF export skips melody glyphs, duration underlines, ornaments, and
ties in measures whose melody is all rests (0). Bar lines remain;
the editor canvas still shows the zeros.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PDF 导出:全休止(全是 0)的小节留空,方便手写音符

1 participant