dymokomi/luce-browser-engine
Source of release 0.6.1
0.6.1 / src / web / layout / svg_text_box.lucb
#==============================================================================================
#
# svg_text_box - Layout::SVGTextBox: the box of a <text> or <tspan>
#
# DESCRIPTION:
# Port of LibWeb/Layout/SVGTextBox.cpp (lines 1-25) and SVGTextBox.h: the constructor, the
# text positioning element and its SVGPathPaintable. (SVGTextBox::viewbox_origin is only
# declared in C++.)
#
# Copyright (c) 2023, Aliaksandr Kalenik <kalenik.aliaksandr@gmail.com>
# SPDX-License-Identifier: BSD-2-Clause
#
#==============================================================================================
## Ported from Libraries/LibWeb/Layout/SVGTextBox.cpp:15 Web::Layout::SVGTextBox::SVGTextBox.
pub func layout_svg_text_box_construct(this: LayoutSvgTextBox*, document: DomDocument*, element: SvgTextPositioningElement*, style: CssComputedProperties*):
layout_svg_graphics_box_construct(this.layout_svg_graphics_box(), document, element.svg_graphics_element(), style)
## Ported from Libraries/LibWeb/Layout/SVGTextBox.h:23 Web::Layout::SVGTextBox::dom_node.
pub func layout_svg_text_box_dom_node(this: LayoutSvgTextBox*) -> SvgTextPositioningElement*:
return (SvgTextPositioningElement*)layout_svg_graphics_box_dom_node(this.layout_svg_graphics_box())
## Ported from Libraries/LibWeb/Layout/SVGTextBox.h:24 Web::Layout::SVGTextBox::dom_node.
pub func layout_svg_text_box_dom_node_const(this: LayoutSvgTextBox*) -> SvgTextPositioningElement*:
return layout_svg_text_box_dom_node(this)
## Ported from Libraries/LibWeb/Layout/SVGTextBox.cpp:20 Web::Layout::SVGTextBox::create_paintable (override).
pub func layout_svg_text_box_create_paintable_impl(base: LayoutNode*) -> PaintPaintable*?:
return paint_svg_path_paintable_create(((LayoutSvgTextBox*)base).layout_svg_graphics_box()).paint_paintable()