Add miter limit functions to all shapes

This commit is contained in:
Lukas Dürrenberger committed 2026-10-04 22:10:41 +02:00
1 parent a08585812d
commit a4c9ecec57
9 files changed
+233

No files matched your search

+9
View File
@@ -47,6 +47,7 @@ TEST_CASE("[Graphics] sfShape")
CHECK(outlineColor.b == sfWhite.b);
CHECK(outlineColor.a == sfWhite.a);
CHECK(sfShape_getOutlineThickness(shape) == 0);
CHECK(sfShape_getMiterLimit(shape) == 10);
CHECK(sfShape_getPointCount(shape) == 3);
const sfVector2f point = sfShape_getPoint(shape, 0);
CHECK(point.x == 0);
@@ -104,4 +105,12 @@ TEST_CASE("[Graphics] sfShape")
CHECK(origin.y == 90);
sfShape_destroy(shape);
}
SECTION("Set/get miter limit")
{
sfShape* shape = sfShape_create(getPointCount, getPoint, &points);
sfShape_setMiterLimit(shape, 2);
CHECK(sfShape_getMiterLimit(shape) == 2);
sfShape_destroy(shape);
}
}