mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +01:00
add Measure::of
This commit is contained in:
parent
6b073988c2
commit
5b57f2b998
4 changed files with 21 additions and 54 deletions
|
|
@ -5,13 +5,14 @@ pub struct PianoHorizontalNotes<'a>(pub(crate) &'a PianoHorizontal);
|
|||
|
||||
render!(Tui: |self: PianoHorizontalNotes<'a>, render|{
|
||||
let time_start = self.0.time_start().get();
|
||||
let note_axis = self.0.note_axis().get();
|
||||
let note_lo = self.0.note_lo().get();
|
||||
let note_hi = self.0.note_hi();
|
||||
let note_point = self.0.note_point();
|
||||
let source = &self.0.buffer;
|
||||
let [x0, y0, w, h] = render.area().xywh();
|
||||
if h as usize != self.0.note_axis().get() {
|
||||
panic!("area height mismatch");
|
||||
if h as usize != note_axis {
|
||||
panic!("area height mismatch: {h} <> {note_axis}");
|
||||
}
|
||||
for (area_x, screen_x) in (x0..x0+w).enumerate() {
|
||||
for (area_y, screen_y, note) in note_y_iter(note_lo, note_hi, y0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue