feat: parameterize stroke color and thickness

This commit is contained in:
2026-03-07 14:49:12 +05:30
parent d620caf02b
commit 3a292ea351
10 changed files with 112 additions and 271 deletions

View File

@@ -46,12 +46,12 @@ void vektor_polygon_free(VektorPolygon* pg) {
free(pg);
}
void vektor_primitivebuffer_add_primitive(VektorPrimitiveBuffer* buffer,
VektorPrimitive prim) {
void vektor_shapebuffer_add_shape(VektorShapeBuffer* buffer,
VektorShape shape) {
if (buffer->count >= buffer->capacity) {
buffer->capacity = buffer->capacity ? buffer->capacity * 2 : 4;
buffer->primitives = realloc(
buffer->primitives, sizeof(VektorPrimitive) * buffer->capacity);
buffer->shapes =
realloc(buffer->shapes, sizeof(VektorShape) * buffer->capacity);
}
buffer->primitives[buffer->count++] = prim;
buffer->shapes[buffer->count++] = shape;
}