Hello, I am was trying to create a function that could generate a triangle in the canvas:
fn triangle(ctx: *capy.DrawContext, x: i32, y: i32, size: i16) void {
ctx.line(x, y, x + size, y);
ctx.line(x + size, y, x + size, y + size);
ctx.line(x + size, y + size, x, y);
ctx.fill();
}
It draws triangles but only as strokes resulting in a hollow shape. I do not know if it's supposed to be that way but maybe removing c.cairo_stroke(self.cr); from
in src/backends/gtk/Canvas.zig could help ? If this a not a solution is there any other way to draw custom shapes in the canvas ? Thanks for creating this awesome library btw :)
Hello, I am was trying to create a function that could generate a triangle in the canvas:
It draws triangles but only as strokes resulting in a hollow shape. I do not know if it's supposed to be that way but maybe removing
c.cairo_stroke(self.cr);
fromin
src/backends/gtk/Canvas.zig
could help ? If this a not a solution is there any other way to draw custom shapes in the canvas ? Thanks for creating this awesome library btw :)