Luce packages
LuceLuce BaseLuciaOS

dymokomi/luce-browser-engine

Source of release 0.6.0

0.6.0 / src / web / layout / svg_image_box.lucb

#==============================================================================================
#
#   svg_image_box - Layout::SVGImageBox: the box of an SVG <image>
#
#   DESCRIPTION:
#       Port of LibWeb/Layout/SVGImageBox.cpp (lines 1-26) and SVGImageBox.h: the constructor,
#       the <image> element and its ImagePaintable.
#
#       Copyright (c) 2024, Tim Ledbetter <tim.ledbetter@ladybird.org>
#       SPDX-License-Identifier: BSD-2-Clause
#
#==============================================================================================

## Ported from Libraries/LibWeb/Layout/SVGImageBox.cpp:16 Web::Layout::SVGImageBox::SVGImageBox.
pub func layout_svg_image_box_construct(this: LayoutSvgImageBox*, document: DomDocument*, element: SvgGraphicsElement*, style: CssComputedProperties*):
    layout_svg_graphics_box_construct(this.layout_svg_graphics_box(), document, element, style)

## Ported from Libraries/LibWeb/Layout/SVGImageBox.h:23 Web::Layout::SVGImageBox::dom_node.
pub func layout_svg_image_box_dom_node(this: LayoutSvgImageBox*) -> SvgImageElement*:
    return (SvgImageElement*)layout_svg_graphics_box_dom_node(this.layout_svg_graphics_box())

## Ported from Libraries/LibWeb/Layout/SVGImageBox.h:24 Web::Layout::SVGImageBox::dom_node.
pub func layout_svg_image_box_dom_node_const(this: LayoutSvgImageBox*) -> SvgImageElement*:
    return layout_svg_image_box_dom_node(this)

## Ported from Libraries/LibWeb/Layout/SVGImageBox.cpp:21 Web::Layout::SVGImageBox::create_paintable (override).
pub func layout_svg_image_box_create_paintable_impl(base: LayoutNode*) -> PaintPaintable*?:
    return paint_image_paintable_create_layout_svg_image_box((LayoutSvgImageBox*)base).paint_paintable()