mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25:38 +00:00
fd498ff35e
ead790126 fix name conflict with rlottie #100 6192f2536 Fix fill default color #105 be5ec7a4f Release v2.3.4 29c32978d Fix std::clamp bug #105 41f21ccb1 Release v2.3.3 git-subtree-dir: external/lunasvg git-subtree-split: ead790126004b86a2dbbe9f4aaf27e82e419721e
30 lines
527 B
C++
30 lines
527 B
C++
#include "stopelement.h"
|
|
#include "parser.h"
|
|
|
|
namespace lunasvg {
|
|
|
|
StopElement::StopElement()
|
|
: StyledElement(ElementID::Stop)
|
|
{
|
|
}
|
|
|
|
double StopElement::offset() const
|
|
{
|
|
auto& value = get(PropertyID::Offset);
|
|
return Parser::parseNumberPercentage(value, 0.0);
|
|
}
|
|
|
|
Color StopElement::stopColorWithOpacity() const
|
|
{
|
|
auto color = stop_color();
|
|
color.combine(stop_opacity());
|
|
return color;
|
|
}
|
|
|
|
std::unique_ptr<Node> StopElement::clone() const
|
|
{
|
|
return cloneElement<StopElement>();
|
|
}
|
|
|
|
} // namespace lunasvg
|