mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-03-06 14:27:43 +00:00

git-subtree-dir: external/lunasvg git-subtree-split: 7417baa0aff477f361e44e2aa793fdb0c7aae352
30 lines
522 B
C++
30 lines
522 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.a = stop_opacity();
|
|
return color;
|
|
}
|
|
|
|
std::unique_ptr<Node> StopElement::clone() const
|
|
{
|
|
return cloneElement<StopElement>();
|
|
}
|
|
|
|
} // namespace lunasvg
|