Work in progress - implementation of cropping in Geometry view instead

of AppearanceView. Display of scaled mixing surface in Mixing and Layers
view. Changed stippling shading.
This commit is contained in:
brunoherbelin
2020-12-07 00:17:10 +01:00
parent 78f9216d32
commit 44b888fd04
20 changed files with 711 additions and 93 deletions

View File

@@ -396,10 +396,10 @@ void ImGuiVisitor::visit (Source& s)
// preview
float preview_width = ImGui::GetContentRegionAvail().x IMGUI_RIGHT_ALIGN;
float width = preview_width;
float height = width / s.frame()->aspectRatio();
float height = s.frame()->projectionArea().y * width / ( s.frame()->projectionArea().x * s.frame()->aspectRatio());
if (height > 230) {
height = 230;
width = height * s.frame()->aspectRatio();
width = height * s.frame()->aspectRatio() * ( s.frame()->projectionArea().x / s.frame()->projectionArea().y);
}
ImGui::Image((void*)(uintptr_t) s.frame()->texture(), ImVec2(width, height));