Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-engine

Source of release 0.6.0

0.6.0 / src / web / layout / svg_pattern_box.lucb

#==============================================================================================
#
#   svg_pattern_box - Layout::SVGPatternBox: the box of a <pattern>
#
#   DESCRIPTION:
#       Port of LibWeb/Layout/SVGPatternBox.cpp (lines 1-24) and SVGPatternBox.h: the
#       constructor, the <pattern> element and the SVGPatternPaintable.
#
#       Copyright (c) 2026, Tim Ledbetter <tim.ledbetter@ladybird.org>
#       SPDX-License-Identifier: BSD-2-Clause
#
#==============================================================================================

## Ported from Libraries/LibWeb/Layout/SVGPatternBox.cpp:14 Web::Layout::SVGPatternBox::SVGPatternBox.
pub func layout_svg_pattern_box_construct(this: LayoutSvgPatternBox*, document: DomDocument*, element: SvgPatternElement*, style: CssComputedProperties*):
    layout_svg_box_construct(this.layout_svg_box(), document, element.svg_element(), style)

## Ported from Libraries/LibWeb/Layout/SVGPatternBox.h:22 Web::Layout::SVGPatternBox::dom_node.
pub func layout_svg_pattern_box_dom_node(this: LayoutSvgPatternBox*) -> SvgPatternElement*:
    return as_svg_pattern_element(layout_svg_box_dom_node(this.layout_svg_box()))

## Ported from Libraries/LibWeb/Layout/SVGPatternBox.h:23 Web::Layout::SVGPatternBox::dom_node.
pub func layout_svg_pattern_box_dom_node_const(this: LayoutSvgPatternBox*) -> SvgPatternElement*:
    return layout_svg_pattern_box_dom_node(this)

## Ported from Libraries/LibWeb/Layout/SVGPatternBox.cpp:19 Web::Layout::SVGPatternBox::create_paintable (override).
pub func layout_svg_pattern_box_create_paintable_impl(base: LayoutNode*) -> PaintPaintable*?:
    return paint_svg_pattern_paintable_create((LayoutSvgPatternBox*)base).paint_paintable()

## Ported from Libraries/LibWeb/Layout/SVGPatternBox.h:28 Web::Layout::SVGPatternBox::is_svg_pattern_box (override).
pub func layout_svg_pattern_box_is_svg_pattern_box_impl(base: LayoutNode*) -> bool:
    _ = base
    return true