mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
test: dashed stroke with offset added
This commit is contained in:
parent
8c0fc2b25a
commit
cb36c25aff
1 changed files with 4 additions and 0 deletions
|
@ -169,13 +169,17 @@ TEST_CASE("Stroking", "[tvgShape]")
|
|||
|
||||
float dashPattern2[3] = {1.0f, 1.5f, 2.22f};
|
||||
REQUIRE(shape->stroke(dashPattern2, 3) == Result::Success);
|
||||
REQUIRE(shape->stroke(dashPattern2, 3, 4.5) == Result::Success);
|
||||
|
||||
const float* dashPattern3;
|
||||
float offset;
|
||||
REQUIRE(shape->strokeDash(nullptr) == 3);
|
||||
REQUIRE(shape->strokeDash(&dashPattern3) == 3);
|
||||
REQUIRE(shape->strokeDash(&dashPattern3, &offset) == 3);
|
||||
REQUIRE(dashPattern3[0] == 1.0f);
|
||||
REQUIRE(dashPattern3[1] == 1.5f);
|
||||
REQUIRE(dashPattern3[2] == 2.22f);
|
||||
REQUIRE(offset == 4.5f);
|
||||
|
||||
REQUIRE(shape->stroke(nullptr, 0) == Result::Success);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue