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