ES-DE/source/gelement.cpp
Leon Styhre 3acd894f37 Squashed 'external/lunasvg/' changes from 7417baa0a..d13d8e521
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
2022-10-03 20:53:48 +02:00

31 lines
682 B
C++

#include "gelement.h"
#include "layoutcontext.h"
namespace lunasvg {
GElement::GElement()
: GraphicsElement(ElementID::G)
{
}
void GElement::layout(LayoutContext* context, LayoutContainer* current) const
{
if(isDisplayNone())
return;
auto group = std::make_unique<LayoutGroup>();
group->transform = transform();
group->opacity = opacity();
group->masker = context->getMasker(mask());
group->clipper = context->getClipper(clip_path());
layoutChildren(context, group.get());
current->addChildIfNotEmpty(std::move(group));
}
std::unique_ptr<Node> GElement::clone() const
{
return cloneElement<GElement>();
}
} // namespace lunasvg