tek/crates/tek_mixer/src/mixer_render.rs

17 lines
374 B
Rust

use crate::*;
render!(Mixer |self, buf, area| {
let mut x = 0;
for channel in self.tracks.iter() {
x = x + channel.render(buf, Rect {
x: area.x + x,
y: area.y,
width: area.width,
height: area.height
})?.width;
if x >= area.width {
break
}
}
Ok(area)
});