mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
loader/lottie: support the stroke offset property
This commit is contained in:
parent
7d797ee548
commit
3d5c5ef0fa
4 changed files with 6 additions and 3 deletions
File diff suppressed because one or more lines are too long
1
src/examples/images/stroke_dash.json
Normal file
1
src/examples/images/stroke_dash.json
Normal file
File diff suppressed because one or more lines are too long
1
src/examples/images/yarn_loading.json
Normal file
1
src/examples/images/yarn_loading.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -152,10 +152,11 @@ static Shape* _updateStroke(LottieSolidStroke* stroke, int32_t frameNo, Shape* b
|
|||
baseShape->stroke(stroke->join);
|
||||
baseShape->strokeMiterlimit(stroke->miterLimit);
|
||||
|
||||
//TODO: offset
|
||||
if (stroke->dashattr) {
|
||||
float dashes[2] = { stroke->dashSize(frameNo), stroke->dashGap(frameNo) };
|
||||
baseShape->stroke(dashes, 2);
|
||||
P(baseShape)->strokeDash(dashes, 2, stroke->dashOffset(frameNo));
|
||||
} else {
|
||||
baseShape->stroke(nullptr, 0);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue