Music XML
ci / checks (push) Successful in 42m24s

This commit is contained in:
khodowany
2026-09-10 22:01:18 -05:00
parent ea4e0bbba1
commit f84717990b
47 changed files with 16739 additions and 8391 deletions
+14 -1
View File
@@ -60,6 +60,19 @@ struct vamp_zero::score_draw_cache {
}
std::unordered_map<std::string, entry> entries{};
std::shared_ptr<vamp_zero::score_document const> page_document{};
std::size_t page_index{};
std::optional<vamp_zero::score_page_layout> page{};
auto draw(luma::draw_context& context, luma::rect bounds, std::shared_ptr<vamp_zero::score_document const> document, std::size_t index) -> void {
if (!page || page_document != document || index != page_index
|| page->bounds.x != bounds.x || page->bounds.y != bounds.y || page->bounds.width != bounds.width || page->bounds.height != bounds.height) {
page = vamp_zero::layout_score_page(bounds, *document, index);
page_document = std::move(document);
page_index = index;
}
vamp_zero::draw_score_layout(context, *page);
}
};
namespace {
@@ -353,7 +366,7 @@ auto draw_score(luma::draw_context& context, luma::rect bounds, vamp_zero::app_s
.width = bounds.width - 48.0F,
.height = bounds.height - 36.0F,
};
vamp_zero::draw_score_page(context, paper_bounds, **parsed, state.page_index);
score_cache.draw(context, paper_bounds, *parsed, state.page_index);
}
class vamp_root_control final : public luma::control {