ES-DE/source/gelement.cpp
Leon Styhre fd498ff35e Squashed 'external/lunasvg/' changes from e0f786c9b..ead790126
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
2022-10-16 12:31:43 +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