SVGGeometryElement.cpp 949 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/Intrinsics.h>
  7. #include <LibWeb/Layout/SVGGeometryBox.h>
  8. #include <LibWeb/SVG/SVGGeometryElement.h>
  9. namespace Web::SVG {
  10. SVGGeometryElement::SVGGeometryElement(DOM::Document& document, DOM::QualifiedName qualified_name)
  11. : SVGGraphicsElement(document, move(qualified_name))
  12. {
  13. set_prototype(&Bindings::cached_web_prototype(realm(), "SVGGeometryElement"));
  14. }
  15. RefPtr<Layout::Node> SVGGeometryElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
  16. {
  17. return adopt_ref(*new Layout::SVGGeometryBox(document(), *this, move(style)));
  18. }
  19. float SVGGeometryElement::get_total_length()
  20. {
  21. return 0;
  22. }
  23. JS::NonnullGCPtr<Geometry::DOMPoint> SVGGeometryElement::get_point_at_length(float distance)
  24. {
  25. (void)distance;
  26. return Geometry::DOMPoint::construct_impl(realm(), 0, 0, 0, 0);
  27. }
  28. }