Документ в канвасе

This commit is contained in:
2026-02-22 22:09:40 +03:00
parent bee9513ba0
commit 85a3bac095
3 changed files with 9 additions and 15 deletions

View File

@@ -112,12 +112,6 @@ fn gui_frame(ctx: *WindowContext) bool {
dvui.label(@src(), "Tools", .{}, .{});
if (active_doc) |doc| {
const canvas = &doc.canvas;
if (dvui.button(@src(), "Fill Random Color", .{}, .{}) or ctx.frame_index == 0) {
canvas.exampleReset() catch |err| {
std.debug.print("Error reset example: {}\n", .{err});
};
canvas.pos = .{ .x = 400, .y = 400 };
}
if (dvui.checkbox(@src(), &canvas.native_scaling, "Scaling", .{})) {}
if (dvui.button(@src(), if (doc.cpu_render.type == .Gradient) "Gradient" else "Squares", .{}, .{})) {
if (doc.cpu_render.type == .Gradient) {