mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
lottie: Revise the solid model
To ensure consistent properties, `LottieSolid` has been defined. Both `LottieSolidStroke` and `LottieSolidFill` can be typecasted to the `LottieSolid`.
This commit is contained in:
parent
e333ca9515
commit
447a3d8ad5
1 changed files with 9 additions and 7 deletions
|
@ -323,20 +323,24 @@ struct LottieTransform : LottieObject
|
|||
};
|
||||
|
||||
|
||||
struct LottieSolidStroke : LottieObject, LottieStroke
|
||||
struct LottieSolid : LottieObject
|
||||
{
|
||||
LottieColor color = RGB24{255, 255, 255};
|
||||
LottieOpacity opacity = 255;
|
||||
};
|
||||
|
||||
|
||||
struct LottieSolidStroke : LottieSolid, LottieStroke
|
||||
{
|
||||
void prepare()
|
||||
{
|
||||
LottieObject::type = LottieObject::SolidStroke;
|
||||
if (color.frames || opacity.frames || LottieStroke::dynamic()) statical = false;
|
||||
}
|
||||
|
||||
LottieColor color = RGB24{255, 255, 255};
|
||||
LottieOpacity opacity = 255;
|
||||
};
|
||||
|
||||
|
||||
struct LottieSolidFill : LottieObject
|
||||
struct LottieSolidFill : LottieSolid
|
||||
{
|
||||
void prepare()
|
||||
{
|
||||
|
@ -344,8 +348,6 @@ struct LottieSolidFill : LottieObject
|
|||
if (color.frames || opacity.frames) statical = false;
|
||||
}
|
||||
|
||||
LottieColor color = RGB24{255, 255, 255};
|
||||
LottieOpacity opacity = 255;
|
||||
FillRule rule = FillRule::Winding;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue