mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-18 14:08:05 +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
abf9cebe06
commit
e398dfd34d
1 changed files with 9 additions and 7 deletions
|
@ -325,20 +325,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()
|
void prepare()
|
||||||
{
|
{
|
||||||
LottieObject::type = LottieObject::SolidStroke;
|
LottieObject::type = LottieObject::SolidStroke;
|
||||||
if (color.frames || opacity.frames || LottieStroke::dynamic()) statical = false;
|
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()
|
void prepare()
|
||||||
{
|
{
|
||||||
|
@ -346,8 +350,6 @@ struct LottieSolidFill : LottieObject
|
||||||
if (color.frames || opacity.frames) statical = false;
|
if (color.frames || opacity.frames) statical = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
LottieColor color = RGB24{255, 255, 255};
|
|
||||||
LottieOpacity opacity = 255;
|
|
||||||
FillRule rule = FillRule::Winding;
|
FillRule rule = FillRule::Winding;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue