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-08-28 13:42:07 +02:00
|
|
|
#include <LibWeb/HTML/Window.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
|
|
|
{
|
2022-09-03 18:43:24 +02:00
|
|
|
set_prototype(&window().cached_web_prototype("SVGGeometryElement"));
|
2020-07-23 09:44:42 -07:00
|
|
|
}
|
2020-07-19 23:01:53 -07:00
|
|
|
|
2022-02-11 12:32:55 +00:00
|
|
|
RefPtr<Layout::Node> SVGGeometryElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
|
|
|
|
{
|
2022-02-11 12:37:22 +00:00
|
|
|
return adopt_ref(*new 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;
|
2022-09-03 21:32:14 +02:00
|
|
|
return Geometry::DOMPoint::create_with_global_object(window(), 0, 0, 0, 0);
|
2022-07-12 20:07:35 +02:00
|
|
|
}
|
|
|
|
|
2020-07-19 23:01:53 -07:00
|
|
|
}
|