2020-07-20 03:01:53 -03:00
|
|
|
/*
|
2021-04-22 20:53:07 -03:00
|
|
|
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
|
2020-07-20 03:01:53 -03:00
|
|
|
*
|
2021-04-22 05:24:48 -03:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-07-20 03:01:53 -03:00
|
|
|
*/
|
|
|
|
|
|
2022-09-25 21:04:39 -03:00
|
|
|
#include <LibWeb/Bindings/Intrinsics.h>
|
2022-02-11 09:37:22 -03:00
|
|
|
#include <LibWeb/Layout/SVGGeometryBox.h>
|
2020-07-23 13:44:42 -03:00
|
|
|
#include <LibWeb/SVG/SVGGeometryElement.h>
|
2020-07-20 03:01:53 -03:00
|
|
|
|
2020-07-23 13:44:42 -03:00
|
|
|
namespace Web::SVG {
|
2020-07-20 03:01:53 -03:00
|
|
|
|
2022-02-18 17:00:52 -03:00
|
|
|
SVGGeometryElement::SVGGeometryElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
2021-02-07 07:20:15 -03:00
|
|
|
: SVGGraphicsElement(document, move(qualified_name))
|
2020-07-23 13:44:42 -03:00
|
|
|
{
|
2023-01-10 08:28:20 -03:00
|
|
|
}
|
|
|
|
|
|
2023-08-07 03:41:28 -03:00
|
|
|
void SVGGeometryElement::initialize(JS::Realm& realm)
|
2023-01-10 08:28:20 -03:00
|
|
|
{
|
2023-08-07 03:41:28 -03:00
|
|
|
Base::initialize(realm);
|
2023-01-10 08:28:20 -03:00
|
|
|
set_prototype(&Bindings::ensure_web_prototype<Bindings::SVGGeometryElementPrototype>(realm, "SVGGeometryElement"));
|
2020-07-23 13:44:42 -03:00
|
|
|
}
|
2020-07-20 03:01:53 -03:00
|
|
|
|
2022-10-17 09:41:50 -03:00
|
|
|
JS::GCPtr<Layout::Node> SVGGeometryElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
|
2022-02-11 09:32:55 -03:00
|
|
|
{
|
2022-10-17 09:41:50 -03:00
|
|
|
return heap().allocate_without_realm<Layout::SVGGeometryBox>(document(), *this, move(style));
|
2022-02-11 09:32:55 -03:00
|
|
|
}
|
|
|
|
|
|
2022-07-12 15:07:35 -03:00
|
|
|
float SVGGeometryElement::get_total_length()
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2022-09-03 16:32:14 -03:00
|
|
|
JS::NonnullGCPtr<Geometry::DOMPoint> SVGGeometryElement::get_point_at_length(float distance)
|
2022-07-12 15:07:35 -03:00
|
|
|
{
|
|
|
|
|
(void)distance;
|
2023-08-15 08:16:09 -03:00
|
|
|
return Geometry::DOMPoint::construct_impl(realm(), 0, 0, 0, 0);
|
2022-07-12 15:07:35 -03:00
|
|
|
}
|
|
|
|
|
|
2020-07-20 03:01:53 -03:00
|
|
|
}
|