mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-26 05:06:12 +01:00
Add miter limit functions to all shapes
This commit is contained in:
9 files changed
+233
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user