Первая версия тулбара
This commit is contained in:
@@ -5,6 +5,8 @@ const RenderEngine = @import("render/RenderEngine.zig").RenderEngine;
|
||||
const Document = @import("models/Document.zig");
|
||||
const random_document = @import("models/random_document.zig");
|
||||
const basic_models = @import("models/basic_models.zig");
|
||||
const tools = @import("tools.zig");
|
||||
const Toolbar = @import("Toolbar.zig");
|
||||
|
||||
const WindowContext = @This();
|
||||
|
||||
@@ -17,7 +19,12 @@ pub const OpenDocument = struct {
|
||||
const default_size = basic_models.Size_f{ .w = 800, .h = 600 };
|
||||
self.document = Document.init(allocator, default_size);
|
||||
self.cpu_render = CpuRenderEngine.init(allocator, .Squares);
|
||||
self.canvas = Canvas.init(allocator, &self.document, (&self.cpu_render).renderEngine());
|
||||
self.canvas = Canvas.init(
|
||||
allocator,
|
||||
&self.document,
|
||||
(&self.cpu_render).renderEngine(),
|
||||
Toolbar.init(&tools.default_tools),
|
||||
);
|
||||
}
|
||||
|
||||
pub fn deinit(self: *OpenDocument) void {
|
||||
|
||||
Reference in New Issue
Block a user