mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-17 04:25:39 +00:00
![Leon Styhre](/assets/img/avatar_default.png)
d13d8e521 Refactoring 4925c87a8 Update 794c38591 Update 49eee9643 Update 914aee5ea Update 3bb00ecee Fix ParserString string-view iterator cast in windows fabea2008 Fix string-view iterator cast in windows bbcf0d34f Update 081df20f2 Update fe3101f91 Refactoring e9a41dc83 Refactoring 637121f89 Update lunasvg.cpp d0abdccb1 Remove Document transformation methods caa4b2410 Fix ft_stroke_border_export assertion 592533914 Fix SW_FT_Outline points overflow #55 0d40b061c Update git-subtree-dir: external/lunasvg git-subtree-split: d13d8e521c21f5f750ef0f6f92163f0131afdd3e
53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
#include "symbolelement.h"
|
|
#include "parser.h"
|
|
|
|
namespace lunasvg {
|
|
|
|
SymbolElement::SymbolElement()
|
|
: StyledElement(ElementID::Symbol)
|
|
{
|
|
}
|
|
|
|
Length SymbolElement::x() const
|
|
{
|
|
auto& value = get(PropertyID::X);
|
|
return Parser::parseLength(value, AllowNegativeLengths, Length::Zero);
|
|
}
|
|
|
|
Length SymbolElement::y() const
|
|
{
|
|
auto& value = get(PropertyID::Y);
|
|
return Parser::parseLength(value, AllowNegativeLengths, Length::Zero);
|
|
}
|
|
|
|
Length SymbolElement::width() const
|
|
{
|
|
auto& value = get(PropertyID::Width);
|
|
return Parser::parseLength(value, ForbidNegativeLengths, Length::HundredPercent);
|
|
}
|
|
|
|
Length SymbolElement::height() const
|
|
{
|
|
auto& value = get(PropertyID::Height);
|
|
return Parser::parseLength(value, ForbidNegativeLengths, Length::HundredPercent);
|
|
}
|
|
|
|
Rect SymbolElement::viewBox() const
|
|
{
|
|
auto& value = get(PropertyID::ViewBox);
|
|
return Parser::parseViewBox(value);
|
|
}
|
|
|
|
PreserveAspectRatio SymbolElement::preserveAspectRatio() const
|
|
{
|
|
auto& value = get(PropertyID::PreserveAspectRatio);
|
|
return Parser::parsePreserveAspectRatio(value);
|
|
}
|
|
|
|
std::unique_ptr<Node> SymbolElement::clone() const
|
|
{
|
|
return cloneElement<SymbolElement>();
|
|
}
|
|
|
|
} // namespace lunasvg
|