From b0259c5788c7efc7bd81ab5138dd0a3f22061fe4 Mon Sep 17 00:00:00 2001 From: "andrew.kraevskii" Date: Wed, 4 Mar 2026 01:43:59 +0300 Subject: [PATCH] Stuff. --- src/WindowContext.zig | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/WindowContext.zig b/src/WindowContext.zig index 9e14d05..a702416 100644 --- a/src/WindowContext.zig +++ b/src/WindowContext.zig @@ -16,15 +16,10 @@ pub const OpenDocument = struct { selected_object_id: ?u64 = null, pub fn init(allocator: std.mem.Allocator, self: *OpenDocument) void { - const default_size = basic_models.Size_f{ .w = 800, .h = 600 }; - self.document = Document.init(default_size); - self.cpu_render = CpuRenderEngine.init(allocator, .Squares); - self.canvas = Canvas.init( - allocator, - &self.document, - (&self.cpu_render).renderEngine(), - ); - self.selected_object_id = null; + initWithDocument(allocator, self, .init(.{ + .w = 800, + .h = 600, + })); } pub fn initWithDocument(allocator: std.mem.Allocator, self: *OpenDocument, doc: Document) void {