Stuff.
This commit is contained in:
@@ -16,15 +16,10 @@ pub const OpenDocument = struct {
|
|||||||
selected_object_id: ?u64 = null,
|
selected_object_id: ?u64 = null,
|
||||||
|
|
||||||
pub fn init(allocator: std.mem.Allocator, self: *OpenDocument) void {
|
pub fn init(allocator: std.mem.Allocator, self: *OpenDocument) void {
|
||||||
const default_size = basic_models.Size_f{ .w = 800, .h = 600 };
|
initWithDocument(allocator, self, .init(.{
|
||||||
self.document = Document.init(default_size);
|
.w = 800,
|
||||||
self.cpu_render = CpuRenderEngine.init(allocator, .Squares);
|
.h = 600,
|
||||||
self.canvas = Canvas.init(
|
}));
|
||||||
allocator,
|
|
||||||
&self.document,
|
|
||||||
(&self.cpu_render).renderEngine(),
|
|
||||||
);
|
|
||||||
self.selected_object_id = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn initWithDocument(allocator: std.mem.Allocator, self: *OpenDocument, doc: Document) void {
|
pub fn initWithDocument(allocator: std.mem.Allocator, self: *OpenDocument, doc: Document) void {
|
||||||
|
|||||||
Reference in New Issue
Block a user