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