const Tool = @import("../Tool.zig");
const shape = @import("../../models/shape/shape.zig");

fn onCanvasClick(ctx: *const Tool.ToolContext) !void {
    const canvas = ctx.canvas;
    var obj = shape.createObject(canvas.allocator, .ellipse) catch return;
    defer obj.deinit(canvas.allocator);
    try ctx.addObject(obj);
}
pub const tool = Tool.Tool{ .onCanvasClick = onCanvasClick };
