Render Quality

This commit is contained in:
2026-03-02 22:43:09 +03:00
parent c399d285fb
commit e5b8e6735d
2 changed files with 58 additions and 5 deletions

View File

@@ -176,6 +176,18 @@ pub fn leftPanel(ctx: *WindowContext) void {
canvas.requestRedraw();
}
if (dvui.checkbox(@src(), &canvas.show_render_stats, "Show stats", .{})) {}
{
dvui.label(@src(), "Rendering quality", .{}, .{});
var quality = canvas.getRenderingQuality();
if (dvui.sliderEntry(
@src(),
"{d:0.0}%",
.{ .value = &quality, .min = 1.0, .max = 100.0, .interval = 1.0 },
.{ .expand = .horizontal },
)) {
canvas.setRenderingQuality(quality);
}
}
if (!canvas.draw_document) {
if (dvui.button(@src(), if (doc.cpu_render.type == .Gradient) "Gradient" else "Squares", .{}, .{})) {
if (doc.cpu_render.type == .Gradient) {