mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-27 16:55:41 +00:00

e0f786c9b Fix parseStyle REVERT: d13d8e521 Refactoring REVERT: 4925c87a8 Update REVERT: 794c38591 Update REVERT: 49eee9643 Update REVERT: 914aee5ea Update REVERT: 3bb00ecee Fix ParserString string-view iterator cast in windows REVERT: fabea2008 Fix string-view iterator cast in windows REVERT: bbcf0d34f Update REVERT: 081df20f2 Update REVERT: fe3101f91 Refactoring REVERT: e9a41dc83 Refactoring git-subtree-dir: external/lunasvg git-subtree-split: e0f786c9be6fae1ffabddfe56fb1e0a1a7eb775d
31 lines
682 B
C++
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
|